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

Unified Diff: third_party/WebKit/LayoutTests/inspector-protocol/page/frameAttachedDetached.js

Issue 2942573003: [DevTools] New harness for inspector-protocol layout tests (Closed)
Patch Set: unified Created 3 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/inspector-protocol/page/frameAttachedDetached.js
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/page/frameAttachedDetached.js b/third_party/WebKit/LayoutTests/inspector-protocol/page/frameAttachedDetached.js
new file mode 100644
index 0000000000000000000000000000000000000000..d98a3f2f811eeb9e56393f688c5d8dbbaab06f7a
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/inspector-protocol/page/frameAttachedDetached.js
@@ -0,0 +1,25 @@
+(async function() {
+ let {page, session, Protocol} = await InspectorTest.startBlank('');
+
+ Protocol.Page.enable();
+ session.evaluate(`
+ window.frame = document.createElement('iframe');
+ frame.src = '${InspectorTest.url('../resources/blank.html')}';
+ document.body.appendChild(frame);
+ `);
+ await Protocol.Page.onceFrameAttached();
+ InspectorTest.log('Attached');
+ await Protocol.Page.onceFrameStartedLoading();
+ InspectorTest.log('Started loading');
+ await Protocol.Page.onceFrameNavigated();
+ InspectorTest.log('Navigated');
+ session.evaluate('frame.src = "about:blank"');
+ await Protocol.Page.onceFrameStartedLoading();
+ InspectorTest.log('Started loading');
+ await Protocol.Page.onceFrameNavigated();
+ InspectorTest.log('Navigated');
+ session.evaluate('document.body.removeChild(frame);');
+ await Protocol.Page.onceFrameDetached();
+ InspectorTest.log('Detached');
+ InspectorTest.completeTest();
+})();

Powered by Google App Engine
This is Rietveld 408576698