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

Side by Side Diff: third_party/WebKit/LayoutTests/storage/domstorage/events/script-tests/case-sensitive.js

Issue 2538773003: Deflake storage/domstorage/events tests when run in random order (Closed)
Patch Set: Rebased Created 4 years 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
« no previous file with comments | « third_party/WebKit/LayoutTests/storage/domstorage/events/script-tests/basic.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 description("Verify that storage events fire even when only the case of the valu e changes."); 1 description("Verify that storage events fire even when only the case of the valu e changes.");
2 2
3 function test(storageString, callback) 3 function test(storageString, callback)
4 { 4 {
5 window.completionCallback = callback; 5 window.completionCallback = callback;
6 window.storage = eval(storageString); 6 window.storage = eval(storageString);
7 if (!storage) { 7 if (!storage) {
8 testFailed(storageString + " DOES NOT exist"); 8 testFailed(storageString + " DOES NOT exist");
9 return; 9 return;
10 } 10 }
11 11
12 debug("Testing " + storageString); 12 debug("Testing " + storageString);
13 13
14 storageEventList = new Array(); 14 storageEventList = new Array();
15 evalAndLog("storage.clear()"); 15 evalAndLog("storage.clear()");
16 shouldBe("storage.length", "0"); 16 shouldBe("storage.length", "0");
17 17
18 iframe.onload = onload;
19 iframe.src = "about:blank";
20 }
21
22 function onload()
23 {
24 iframe.contentWindow.onstorage = function (e) {
25 window.parent.storageEventList.push(e);
26 };
27
18 debug(""); 28 debug("");
19 debug("Verify storage events are case sensitive"); 29 debug("Verify storage events are case sensitive");
20 evalAndLog("storage.foo = 'test'"); 30 evalAndLog("storage.foo = 'test'");
21 31
22 runAfterNStorageEvents(step1, 1); 32 runAfterNStorageEvents(step1, 1);
23 } 33 }
24 34
25 function step1() 35 function step1()
26 { 36 {
27 debug("Reset storage event list"); 37 debug("Reset storage event list");
(...skipping 14 matching lines...) Expand all
42 function step3() 52 function step3()
43 { 53 {
44 shouldBe("storageEventList.length", "1"); 54 shouldBe("storageEventList.length", "1");
45 55
46 completionCallback(); 56 completionCallback();
47 } 57 }
48 58
49 testStorages(test); 59 testStorages(test);
50 60
51 var successfullyParsed = true; 61 var successfullyParsed = true;
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/storage/domstorage/events/script-tests/basic.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698