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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/inspector/sources/navigator-view-content-scripts.html

Issue 2696143005: DevTools: fix NavigatorView exception (Closed)
Patch Set: move test to http Created 3 years, 10 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/http/tests/inspector/sources/navigator-view-content-scripts-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/http/tests/inspector/sources/navigator-view-content-scripts.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector/sources/navigator-view-content-scripts.html b/third_party/WebKit/LayoutTests/http/tests/inspector/sources/navigator-view-content-scripts.html
new file mode 100644
index 0000000000000000000000000000000000000000..a3f4835950900be276695ddd21d004236edf3004
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/http/tests/inspector/sources/navigator-view-content-scripts.html
@@ -0,0 +1,41 @@
+<html>
+<head>
+<script src="../inspector-test.js"></script>
+
+<script>
+function test()
+{
+ function addUISourceCode(url, isContentScript)
+ {
+ var contentProvider = Common.StaticContentProvider.fromString(url, Common.resourceTypes.Script, "");
+ var networkProject = Bindings.NetworkProject.forTarget(InspectorTest.mainTarget);
+ var uiSourceCode = networkProject.addFile(contentProvider, InspectorTest.mainFrame(), isContentScript);
+ return uiSourceCode;
+ }
+
+ var rootURL = "http://localhost:8080/LayoutTests/inspector/debugger/";
+ var sourcesNavigatorView = new Sources.SourcesNavigatorView();
+ sourcesNavigatorView.show(UI.inspectorView.element);
+
+ InspectorTest.addResult("\n\n================================================");
+ InspectorTest.addResult("Adding urls");
+ addUISourceCode(rootURL + "foo/bar/script.js", false);
+ var contentUISourceCode = addUISourceCode(rootURL + "foo/bar/contentScript2.js?a=1", true);
+ InspectorTest.dumpNavigatorView(sourcesNavigatorView);
+
+ InspectorTest.addResult("\n\n================================================");
+ InspectorTest.addResult("Removing contentScripts project");
+ contentUISourceCode.project().removeProject();
+ InspectorTest.dumpNavigatorView(sourcesNavigatorView);
+ InspectorTest.completeTest();
+}
+</script>
+
+</head>
+<body onload="runTest()">
+<p>Verify that removal of one of the multiple projects, all of which are associated with the same
+frame, doesn't lead navigator to discard the frame treenode.</p>
+</p>
+</body>
+
+</html>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/http/tests/inspector/sources/navigator-view-content-scripts-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698