| 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..133e78aad56367664f18a7035f14d6c79c5775d0
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/http/tests/inspector/devtools-js/release-note.js
|
| @@ -0,0 +1,65 @@
|
| +// Copyright 2017 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +TestRunner.addResult("Test release note\n");
|
| +
|
| +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();
|
| +}
|
|
|