| 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..15137e2de5f8cdc823a27efdfe972f6fb6ea9bfe
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/inspector/help/release-note.html
|
| @@ -0,0 +1,66 @@
|
| +<html>
|
| +<head>
|
| +<script src="../../http/tests/inspector/inspector-test.js"></script>
|
| +<script>
|
| +function test() {
|
| + Help.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',
|
| + },
|
| + }
|
| + ];
|
| +
|
| + const originalShowPanel = UI.inspectorView.showPanel.bind(UI.inspectorView);
|
| + InspectorTest.addSniffer(UI.inspectorView, 'showPanel', onShowPanel);
|
| +
|
| + InspectorTest.addResult(`Browser user agent: ${navigator.userAgent}\n`);
|
| + Help.ReleaseNoteManager.init();
|
| +
|
| + function onShowPanel(...args) {
|
| + originalShowPanel(...args).then(() => onReleaseNoteShown());
|
| + }
|
| +
|
| + function onReleaseNoteShown() {
|
| + const releaseNoteView = UI.viewManager.view('release-note');
|
| + 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(Help.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>
|
|
|