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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/inspector/devtools-js/release-note.js

Issue 2742623002: DevTools: improve test infrastructure w/ devtools driving the test (Closed)
Patch Set: fixup Created 3 years, 9 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/http/tests/inspector/devtools-js/release-note.js
diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector/devtools-js/release-note.js b/third_party/WebKit/LayoutTests/http/tests/inspector/devtools-js/release-note.js
new file mode 100644
index 0000000000000000000000000000000000000000..f1dc7542a82ee9f21598af233f183fa38192b695
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/http/tests/inspector/devtools-js/release-note.js
@@ -0,0 +1,62 @@
+TestRunner.addResult("Test release note\n");
dgozman 2017/03/10 00:17:17 Copyright!
+
+Help.releaseNoteText = [
+ {
+ version: 99,
+ highlights: [
+ {
+ contents: [
+ {
+ text: 'Improved',
+ },
+ {
+ text: 'Performance and Memory panels',
+ link: 'https://developers.google.com/web/tools/chrome-devtools/',
+ }
+ ],
+ featured: true,
+ },
+ {
+ contents: [
+ {
+ text: 'Edit cookies directly',
+ link: 'https://developers.google.com/web/tools/chrome-devtools/',
+ },
+ {
+ text: 'from the Application panel',
+ },
+ ],
+ },
+ ],
+ link: 'https://developers.google.com/web/tools/chrome-devtools/',
+ image: {
+ src: './resources/test.png',
+ },
+ },
+];
+
+TestRunner.addSniffer(UI.inspectorView, "showPanel", onPanelShown);
+
+TestRunner.addResult(`Browser version: ${Help.browserVersion()}\n`);
+Help.showReleaseNoteIfNeeded();
+
+function onPanelShown(viewId, panelPromise) {
+ panelPromise.then(() => {
+ var releaseNoteView = UI.viewManager.view("release-note");
+ var releaseNoteElement = releaseNoteView[UI.View._widgetSymbol].contentElement;
+ TestRunner.addResult("Dumping release note text:");
+ TestRunner.addResult(releaseNoteElement.innerText);
+ TestRunner.addResult("Last version of release note seen should be updated:");
+ TestRunner.addResult(Help.releaseNoteVersionSetting().get() + "\n");
+
+ TestRunner.addSniffer(UI.InspectorView.prototype, "closeDrawerTab", onClose);
+ TestRunner.addResult("Click on hide button");
+ var closeButton = releaseNoteElement.querySelector(".close-release-note");
+ closeButton.click();
+ });
+}
+
+function onClose(view) {
+ TestRunner.addResult(`Hiding view: ${view}`);
+ TestRunner.completeTest();
+}

Powered by Google App Engine
This is Rietveld 408576698