Skip to content

Commit

Permalink
Fixup to address my review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
zcorpan committed Apr 6, 2017
1 parent 87afd09 commit 590ee4b
Show file tree
Hide file tree
Showing 4 changed files with 87 additions and 79 deletions.
Expand Up @@ -12,39 +12,41 @@
<script src="/common/PrefixedPostMessage.js"></script>
<script>
var windowURL = 'resources/message-opener.html';
var width = 'width=401,';
var height = 'height=402,';

[ 'left=152',
' left = 152',
'left==152',
'\nleft= 152',
',left=152,,',
'LEFT=152'
[ 'left=141',
' left = 141',
'left==141',
'\nleft= 141',
',left=141,,',
'LEFT=141'
].forEach((features, idx, arr) => {
async_test(t => {
var prefixedMessage = new PrefixedMessageTest();
prefixedMessage.onMessage(t.step_func_done((data, e) => {
e.source.close();
assert_equals(data.left, 152);
assert_equals(data.left, 141);
}));
var win = window.open(prefixedMessage.url(windowURL), '', features);
}, `"${features}" (${idx + 1} of ${arr.length}) should set left position of opened window`);
var win = window.open(prefixedMessage.url(windowURL), '', width + height + features);
}, `"${features}" should set left position of opened window`);
});

[ 'top=152',
' top = 152',
'top==152',
'\ttop= 152',
',top=152,,',
'TOP=152'
[ 'top=142',
' top = 142',
'top==142',
'\ttop= 142',
',top=142,,',
'TOP=142'
].forEach((features, idx, arr) => {
async_test(t => {
var prefixedMessage = new PrefixedMessageTest();
prefixedMessage.onMessage(t.step_func_done((data, e) => {
e.source.close();
assert_equals(data.top, 152);
assert_equals(data.top, 142);
}));
var win = window.open(prefixedMessage.url(windowURL), '', features);
}, `"${features}" (${idx + 1} of ${arr.length}) should set top position of opened window`);
var win = window.open(prefixedMessage.url(windowURL), '', width + height + features);
}, `${format_value(features)} should set top position of opened window`);
});

[ 'top=152,left=152',
Expand All @@ -59,8 +61,8 @@
assert_equals(data.top, 152);
assert_equals(data.left, 152);
}));
var win = window.open(prefixedMessage.url(windowURL), '', features);
}, `"${features}" (${idx + 1} of ${arr.length}) should set top and left position of opened window`);
var win = window.open(prefixedMessage.url(windowURL), '', width + height + features);
}, `${format_value(features)} should set top and left position of opened window`);
});

</script>
Expand Up @@ -12,57 +12,59 @@
<script src="/common/PrefixedPostMessage.js"></script>
<script>
var windowURL = 'resources/message-opener.html';
var width = 'width=401,';
var height = 'height=402,';

[ 'width=142',
' width = 142',
'width==142',
'\nwidth= 142',
',width=142,,',
'WIDTH=142'
[ 'width=401',
' width = 401',
'width==401',
'\nwidth= 401',
',width=401,,',
'WIDTH=401'
].forEach((features, idx, arr) => {
async_test(t => {
var prefixedMessage = new PrefixedMessageTest();
prefixedMessage.onMessage(t.step_func_done((data, e) => {
e.source.close();
assert_equals(data.width, 142);
assert_equals(data.width, 401);
}));
var win = window.open(prefixedMessage.url(windowURL), '', features);
}, `"${features}" (${idx + 1} of ${arr.length}) should set width of opened window`);
var win = window.open(prefixedMessage.url(windowURL), '', height + features);
}, `${format_value(features)} should set width of opened window`);
});

[ 'height=142',
' height = 142',
'height==142',
'\nheight= 142',
',height=142,,',
'HEIGHT=142'
[ 'height=402',
' height = 402',
'height==402',
'\nheight= 402',
',height=402,,',
'HEIGHT=402'
].forEach((features, idx, arr) => {
async_test(t => {
var prefixedMessage = new PrefixedMessageTest();
prefixedMessage.onMessage(t.step_func_done((data, e) => {
e.source.close();
assert_equals(data.height, 142);
assert_equals(data.height, 402);
}));
var win = window.open(prefixedMessage.url(windowURL), '', features);
}, `"${features}" (${idx + 1} of ${arr.length}) should set height of opened window`);
var win = window.open(prefixedMessage.url(windowURL), '', width + features);
}, `${format_value(features)} should set height of opened window`);
});

[ 'height=137,width=134',
' height = 137 , width = 134 ,',
'height==137 width = 134',
'\nheight= 137,,width=\n134',
',height=137,,width==134',
'HEIGHT=137, WIDTH=134'
[ 'height=402,width=401',
' height = 402 , width = 401 ,',
'height==402 width = 401',
'\nheight= 402,,width=\n401',
',height=402,,width==401',
'HEIGHT=402, WIDTH=401'
].forEach((features, idx, arr) => {
async_test(t => {
var prefixedMessage = new PrefixedMessageTest();
prefixedMessage.onMessage(t.step_func_done((data, e) => {
e.source.close();
assert_equals(data.height, 137);
assert_equals(data.width, 134)
assert_equals(data.height, 402);
assert_equals(data.width, 401)
}));
var win = window.open(prefixedMessage.url(windowURL), '', features);
}, `"${features}" (${idx + 1} of ${arr.length}) should set height and width of opened window`);
}, `${format_value(features)} should set height and width of opened window`);
});

</script>
Expand Up @@ -12,23 +12,25 @@
<script src="/common/PrefixedPostMessage.js"></script>
<script>
var windowURL = 'resources/message-opener.html';
var width = 'width=401,';
var height = 'height=402,';

[ 'screenx=142',
' screenx = 142',
'screenx==142',
'\nscreenx= 142',
',screenx=142,,',
'SCREENX=142',
'screenX=142'
[ 'screenx=141',
' screenx = 141',
'screenx==141',
'\nscreenx= 141',
',screenx=141,,',
'SCREENX=141',
'screenX=141'
].forEach((features, idx, arr) => {
async_test(t => {
var prefixedMessage = new PrefixedMessageTest();
prefixedMessage.onMessage(t.step_func_done((data, e) => {
e.source.close();
assert_equals(data.left, 142);
assert_equals(data.left, 141);
}));
var win = window.open(prefixedMessage.url(windowURL), '', features);
}, `"${features}" (${idx + 1} of ${arr.length}) should set left position of opened window`);
var win = window.open(prefixedMessage.url(windowURL), '', width + height + features);
}, `${format_value(features)} should set left position of opened window`);
});

[ 'screeny=142',
Expand All @@ -45,8 +47,8 @@
e.source.close();
assert_equals(data.top, 142);
}));
var win = window.open(prefixedMessage.url(windowURL), '', features);
}, `"${features}" (${idx + 1} of ${arr.length}) should set top position of opened window`);
var win = window.open(prefixedMessage.url(windowURL), '', width + height + features);
}, `${format_value(features)} should set top position of opened window`);
});

</script>
Expand Up @@ -12,41 +12,43 @@
<script src="/common/PrefixedPostMessage.js"></script>
<script>
var windowURL = 'resources/message-opener.html';
var width = 'width=401,';
var height = 'height=402,';

[ 'innerwidth=142',
' innerwidth = 142',
'innerwidth==142',
'\ninnerwidth= 142',
',innerwidth=142,,',
'INNERWIDTH=142',
'innerWidth=142'
[ 'innerwidth=401',
' innerwidth = 401',
'innerwidth==401',
'\ninnerwidth= 401',
',innerwidth=401,,',
'INNERWIDTH=401',
'innerWidth=401'
].forEach((features, idx, arr) => {
async_test(t => {
var prefixedMessage = new PrefixedMessageTest();
prefixedMessage.onMessage(t.step_func_done((data, e) => {
e.source.close();
assert_equals(data.width, 142);
assert_equals(data.width, 401);
}));
var win = window.open(prefixedMessage.url(windowURL), '', features);
}, `"${features}" (${idx + 1} of ${arr.length}) should set width of opened window`);
var win = window.open(prefixedMessage.url(windowURL), '', height + features);
}, `${format_value(features)} should set width of opened window`);
});

[ 'innerheight=142',
' innerheight = 142',
'innerheight==142',
'\ninnerheight= 142',
',innerheight=142,,',
'INNERHEIGHT=142',
'innerHeight=142'
[ 'innerheight=402',
' innerheight = 402',
'innerheight==402',
'\ninnerheight= 402',
',innerheight=402,,',
'INNERHEIGHT=402',
'innerHeight=402'
].forEach((features, idx, arr) => {
async_test(t => {
var prefixedMessage = new PrefixedMessageTest();
prefixedMessage.onMessage(t.step_func_done((data, e) => {
e.source.close();
assert_equals(data.height, 142);
assert_equals(data.height, 402);
}));
var win = window.open(prefixedMessage.url(windowURL), '', features);
}, `"${features}" (${idx + 1} of ${arr.length}) should set height of opened window`);
var win = window.open(prefixedMessage.url(windowURL), '', width + features);
}, `${format_value(features)} should set height of opened window`);
});

</script>

0 comments on commit 590ee4b

Please sign in to comment.