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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/inspector/service-workers/service-workers-force-update-on-page-load.html

Issue 1841863003: DevTools: move the force update SW on reload checkbox to the Resources / Service Workers view. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: test fixed Created 4 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 <html> 1 <html>
2 <head> 2 <head>
3 <script src="../inspector-test.js"></script> 3 <script src="../inspector-test.js"></script>
4 <script src="service-workers-test.js"></script> 4 <script src="service-workers-test.js"></script>
5 <script src="../resources-test.js"></script> 5 <script src="../resources-test.js"></script>
6 <script> 6 <script>
7 7
8 function loadIframe(resolve, reject, url) 8 function loadIframe(resolve, reject, url)
9 { 9 {
10 var frame = document.createElement('iframe'); 10 var frame = document.createElement('iframe');
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 InspectorTest.addResult("The first ServiceWorker is activated."); 58 InspectorTest.addResult("The first ServiceWorker is activated.");
59 return InspectorTest.invokePageFunctionPromise("loadIframe", [scope] ) 59 return InspectorTest.invokePageFunctionPromise("loadIframe", [scope] )
60 }) 60 })
61 .then(function() { 61 .then(function() {
62 InspectorTest.addResult("The first frame loaded."); 62 InspectorTest.addResult("The first frame loaded.");
63 return InspectorTest.invokePageFunctionPromise("loadIframe", [scope] ); 63 return InspectorTest.invokePageFunctionPromise("loadIframe", [scope] );
64 }) 64 })
65 .then(function() { 65 .then(function() {
66 InspectorTest.addResult("The second frame loaded."); 66 InspectorTest.addResult("The second frame loaded.");
67 InspectorTest.addResult("Check \"Force update on page load\" check b ox"); 67 InspectorTest.addResult("Check \"Force update on page load\" check b ox");
68 WebInspector.panels.sources.sidebarPanes.serviceWorkers.expand(); 68 WebInspector.settings.settingForTest("serviceWorkerUpdateOnReload"). set(true);
69 for (var element of WebInspector.panels.sources.sidebarPanes.service Workers._versionIdCheckBoxMap.values()) {
70 element.click();
71 }
72 return InspectorTest.invokePageFunctionPromise("loadIframe", [scope] ); 69 return InspectorTest.invokePageFunctionPromise("loadIframe", [scope] );
73 }) 70 })
74 .then(function() { 71 .then(function() {
75 InspectorTest.addResult("The third frame loaded. The second worker m ust be activated before here."); 72 InspectorTest.addResult("The third frame loaded. The second worker m ust be activated before here.");
76 return InspectorTest.invokePageFunctionPromise("loadIframe", [scope] ); 73 return InspectorTest.invokePageFunctionPromise("loadIframe", [scope] );
77 }) 74 })
78 .then(function() { 75 .then(function() {
79 InspectorTest.addResult("The fourth frame loaded. The third worker must be activated before here."); 76 InspectorTest.addResult("The fourth frame loaded. The third worker must be activated before here.");
80 InspectorTest.addResult("Uncheck \"Force update on page load\" check box"); 77 InspectorTest.addResult("Uncheck \"Force update on page load\" check box");
81 for (var element of WebInspector.panels.sources.sidebarPanes.service Workers._versionIdCheckBoxMap.values()) { 78 WebInspector.settings.settingForTest("serviceWorkerUpdateOnReload"). set(false);
82 element.click();
83 }
84 return InspectorTest.invokePageFunctionPromise("loadIframe", [scope] ); 79 return InspectorTest.invokePageFunctionPromise("loadIframe", [scope] );
85 }) 80 })
86 .then(function() { 81 .then(function() {
87 InspectorTest.addResult("The fifth frame loaded."); 82 InspectorTest.addResult("The fifth frame loaded.");
88 InspectorTest.deleteServiceWorkerRegistration(scope); 83 InspectorTest.deleteServiceWorkerRegistration(scope);
89 InspectorTest.completeTest(); 84 InspectorTest.completeTest();
90 }) 85 })
91 .catch(function(exception) { 86 .catch(function(exception) {
92 InspectorTest.addResult("Error"); 87 InspectorTest.addResult("Error");
93 InspectorTest.addResult(exception); 88 InspectorTest.addResult(exception);
94 InspectorTest.deleteServiceWorkerRegistration(scope); 89 InspectorTest.deleteServiceWorkerRegistration(scope);
95 InspectorTest.completeTest(); 90 InspectorTest.completeTest();
96 }); 91 });
97 WebInspector.panels.resources.serviceWorkersTreeElement.select(); 92 WebInspector.panels.resources.serviceWorkersTreeElement.select();
98 InspectorTest.registerServiceWorker(scriptURL, scope); 93 InspectorTest.registerServiceWorker(scriptURL, scope);
99 } 94 }
100 95
101 </script> 96 </script>
102 </head> 97 </head>
103 <body onload="runTest()"> 98 <body onload="runTest()">
104 <p>Tests "Force update on page load" checkbox<p> 99 <p>Tests "Force update on page load" checkbox<p>
105 </body> 100 </body>
106 </html> 101 </html>
OLDNEW
« no previous file with comments | « content/browser/service_worker/service_worker_registration.cc ('k') | third_party/WebKit/Source/devtools/devtools.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698