Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(345)

Side by Side Diff: LayoutTests/fast/js/var-declarations-shadowing.html

Issue 1087493002: Support [Replaceable] for screen, pageXOffset, pageYOffset (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 <p> 1 <p>
2 This page tests var declarations that attempt to shadow interesting global prope rties in 2 This page tests var declarations that attempt to shadow interesting global prope rties in
3 interesting ways. <a href="http://bugs.webkit.org/show_bug.cgi?id=16644">Bug 166 44</a>. 3 interesting ways. <a href="http://bugs.webkit.org/show_bug.cgi?id=16644">Bug 166 44</a>.
4 </p> 4 </p>
5 5
6 <p> 6 <p>
7 If the test passes, you'll see a series of PASS messages below. 7 If the test passes, you'll see a series of PASS messages below.
8 </p> 8 </p>
9 9
10 <pre id="console"></pre> 10 <pre id="console"></pre>
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 243
244 try { 244 try {
245 eval("var defaultstatus = marker"); 245 eval("var defaultstatus = marker");
246 } catch(e) { } 246 } catch(e) { }
247 shouldBe(defaultstatus == marker, "defaultstatus == marker", true); 247 shouldBe(defaultstatus == marker, "defaultstatus == marker", true);
248 shouldBe(eval('defaultstatus == marker'), "eval('defaultstatus == marker')", tru e); 248 shouldBe(eval('defaultstatus == marker'), "eval('defaultstatus == marker')", tru e);
249 249
250 try { 250 try {
251 eval("var screen = marker"); 251 eval("var screen = marker");
252 } catch(e) { } 252 } catch(e) { }
253 shouldBe(screen == marker, "screen == marker", false); 253 shouldBe(screen == marker, "screen == marker", true);
254 shouldBe(eval('screen == marker'), "eval('screen == marker')", false); 254 shouldBe(eval('screen == marker'), "eval('screen == marker')", true);
255 255
256 try { 256 try {
257 eval("var history = marker"); 257 eval("var history = marker");
258 } catch(e) { } 258 } catch(e) { }
259 shouldBe(history == marker, "history == marker", false); 259 shouldBe(history == marker, "history == marker", false);
260 shouldBe(eval('history == marker'), "eval('history == marker')", false); 260 shouldBe(eval('history == marker'), "eval('history == marker')", false);
261 261
262 log("-----"); 262 log("-----");
263 263
264 try { 264 try {
265 eval("var frameElement = marker"); 265 eval("var frameElement = marker");
266 } catch(e) { } 266 } catch(e) { }
267 shouldBe(frameElement == marker, "frameElement == marker", false); 267 shouldBe(frameElement == marker, "frameElement == marker", false);
268 shouldBe(eval('frameElement == marker'), "eval('frameElement == marker')", false ); 268 shouldBe(eval('frameElement == marker'), "eval('frameElement == marker')", false );
269 269
270 try { 270 try {
271 eval("var pageXOffset = marker"); 271 eval("var pageXOffset = marker");
272 } catch(e) { } 272 } catch(e) { }
273 shouldBe(pageXOffset == marker, "pageXOffset == marker", false); 273 shouldBe(pageXOffset == marker, "pageXOffset == marker", true);
274 shouldBe(eval('pageXOffset == marker'), "eval('pageXOffset == marker')", false); 274 shouldBe(eval('pageXOffset == marker'), "eval('pageXOffset == marker')", true);
275 275
276 try { 276 try {
277 eval("var pageYOffset = marker"); 277 eval("var pageYOffset = marker");
278 } catch(e) { } 278 } catch(e) { }
279 shouldBe(pageYOffset == marker, "pageYOffset == marker", false); 279 shouldBe(pageYOffset == marker, "pageYOffset == marker", true);
280 shouldBe(eval('pageYOffset == marker'), "eval('pageYOffset == marker')", false); 280 shouldBe(eval('pageYOffset == marker'), "eval('pageYOffset == marker')", true);
281 281
282 try { 282 try {
283 eval("var closed = marker"); 283 eval("var closed = marker");
284 } catch(e) { } 284 } catch(e) { }
285 shouldBe(closed == marker, "closed == marker", false); 285 shouldBe(closed == marker, "closed == marker", false);
286 shouldBe(eval('closed == marker'), "eval('closed == marker')", false); 286 shouldBe(eval('closed == marker'), "eval('closed == marker')", false);
287 287
288 try { 288 try {
289 eval("var window = marker"); 289 eval("var window = marker");
290 } catch(e) { } 290 } catch(e) { }
(...skipping 12 matching lines...) Expand all
303 shouldBe(crypto == marker, "crypto == marker", false); 303 shouldBe(crypto == marker, "crypto == marker", false);
304 shouldBe(eval('crypto == marker'), "eval('crypto == marker')", false); 304 shouldBe(eval('crypto == marker'), "eval('crypto == marker')", false);
305 305
306 try { 306 try {
307 eval("var top = marker"); 307 eval("var top = marker");
308 } catch(e) { } 308 } catch(e) { }
309 shouldBe(top == marker, "top == marker", false); 309 shouldBe(top == marker, "top == marker", false);
310 shouldBe(eval('top == marker'), "eval('top == marker')", false); 310 shouldBe(eval('top == marker'), "eval('top == marker')", false);
311 311
312 </script> 312 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698