| Index: third_party/WebKit/LayoutTests/inspector/console/release-note.html
|
| diff --git a/third_party/WebKit/LayoutTests/inspector/console/release-note.html b/third_party/WebKit/LayoutTests/inspector/console/release-note.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..c11b6ec4881c41476d2bb8e71d307c20093c8368
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/inspector/console/release-note.html
|
| @@ -0,0 +1,74 @@
|
| +<html>
|
| +<head>
|
| +<script src="../../http/tests/inspector/inspector-test.js"></script>
|
| +<script src="../../http/tests/inspector/console-test.js"></script>
|
| +<script>
|
| +function test() {
|
| + Runtime.experiments.enableForTest("releaseNote");
|
| + Help.ReleaseNoteManager._releaseNotesByVersion = [
|
| + {
|
| + version: 99,
|
| + highlights: [
|
| + {
|
| + text: 'Re-designed Performance panel',
|
| + link: 'https://google.com/',
|
| + featured: true,
|
| + },
|
| + {
|
| + text: 'Inline breakpoints',
|
| + link: 'https://google.com/',
|
| + },
|
| + {
|
| + text: 'Better async debugging',
|
| + link: 'https://google.com/',
|
| + },
|
| + {
|
| + text: 'Node.js debugging is stable',
|
| + link: 'https://google.com/',
|
| + },
|
| + ],
|
| + link: 'https://google.com/',
|
| + image: {
|
| + src: './resources/test.png',
|
| + caption: 'Amazing color picker',
|
| + },
|
| + }
|
| + ];
|
| +
|
| + const consoleView = Console.ConsoleView.instance();
|
| + const releaseNoteManager = consoleView._releaseNoteManager;
|
| + releaseNoteManager._timeoutDuration = 1;
|
| + releaseNoteManager._versionSetting.set(98);
|
| + InspectorTest.addResult(`Last version of release note seen: ${releaseNoteManager._versionSetting.get()}`);
|
| + InspectorTest.addResult(`Browser user agent: ${navigator.userAgent}\n`);
|
| + InspectorTest.addSniffer(Console.ConsoleView.prototype, "sawReleaseNote", onSawReleaseNote);
|
| +
|
| + InspectorTest.addResult('Adding release note');
|
| + consoleView._addReleaseNote();
|
| +
|
| + InspectorTest.addResult('Dump release note from console');
|
| + InspectorTest.dumpConsoleMessages();
|
| +
|
| + function onSawReleaseNote() {
|
| + InspectorTest.addResult('');
|
| + InspectorTest.addResult(`Last version of release note should be updated: ${releaseNoteManager._versionSetting.get()}\n`);
|
| + const closeButton = self.document.querySelector('.close-release-note-message');
|
| + InspectorTest.addResult('Close release note\n');
|
| + closeButton.click();
|
| + InspectorTest.addResult('Console should no longer have release note');
|
| + InspectorTest.dumpConsoleMessages();
|
| + InspectorTest.completeTest();
|
| + }
|
| +
|
| +
|
| +}
|
| +
|
| +</script>
|
| +</head>
|
| +<body onload="runTest()">
|
| +<p>
|
| +Tests for release note
|
| +</p>
|
| +
|
| +</body>
|
| +</html>
|
|
|