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

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

Issue 2649023007: DevTools: implement release note behind an experiment (Closed)
Patch Set: finalize 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/help/release-note.html
diff --git a/third_party/WebKit/LayoutTests/inspector/help/release-note.html b/third_party/WebKit/LayoutTests/inspector/help/release-note.html
new file mode 100644
index 0000000000000000000000000000000000000000..03d7daf690ba5168ed484b8caccc522be3cca3ca
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/inspector/help/release-note.html
@@ -0,0 +1,62 @@
+<html>
+<head>
+<script src="../../http/tests/inspector/inspector-test.js"></script>
+<script>
+function test() {
+ Help.ReleaseNoteManager.releaseNotesByVersion = [
+ {
+ version: 99,
+ highlights: [
+ {
+ text: 'Test bullet #1',
+ link: 'https://google.com/',
+ featured: true,
+ },
+ {
+ text: 'Test bullet #2',
+ link: 'https://google.com/',
+ },
+ ],
+ link: 'https://google.com/',
+ image: {
+ src: './resources/test.png',
+ caption: 'Test image',
+ },
+ }
+ ];
+ Help.releaseNoteManager = new Help.ReleaseNoteManager();
+ const releaseNoteManager = Help.releaseNoteManager;
+ const releaseNoteView = self.UI.viewManager.view('release-note');
+ releaseNoteManager._versionSetting.set(98);
+ InspectorTest.addResult(`Last version of release note seen: ${releaseNoteManager._versionSetting.get()}`);
+ InspectorTest.addResult(`Browser user agent: ${navigator.userAgent}\n`);
+ releaseNoteManager._init().then(onPanelShown);
+
+ function onPanelShown() {
+ const releaseNoteElement = releaseNoteView[UI.View._widgetSymbol].contentElement;
+ InspectorTest.addResult('Dumping release note text:');
+ InspectorTest.addResult(releaseNoteElement.innerText);
+ InspectorTest.addResult('Last version of release note seen should be updated:');
+ InspectorTest.addResult(releaseNoteManager._versionSetting.get() + '\n');
+
+ InspectorTest.addSniffer(UI.InspectorView.prototype, 'closeDrawerTab', onClose);
+ InspectorTest.addResult('Click on hide button');
+ const closeButton = releaseNoteElement.querySelector('.close-release-note');
+ closeButton.click();
+ }
+
+ function onClose(view) {
+ InspectorTest.addResult(`Hiding view: ${view}`);
+ InspectorTest.completeTest();
+ }
+}
+
+</script>
+</head>
+<body onload="runTest()">
+<p>
+Test release note
+</p>
+
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698