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

Unified Diff: third_party/WebKit/LayoutTests/inspector/console/release-note.html

Issue 2649023007: DevTools: implement release note behind an experiment (Closed)
Patch Set: fixup 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
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>

Powered by Google App Engine
This is Rietveld 408576698