bug 1523104: remote: update the demo script to use a local page; r=ato
authorAlexandre Poirot <poirot.alex@gmail.com>
Tue, 12 Feb 2019 06:06:33 -0800
changeset 521077 ac7c2e018cb60c5061254fb475f5dbc86ae9a29b
parent 521076 f73d7c3bced49eb09f5f3cf4a0dc6088f931b143
child 521078 d7e26a1b6ef71bb156732495eacaa7d97b2dc4f2
push id10862
push userffxbld-merge
push dateMon, 11 Mar 2019 13:01:11 +0000
treeherdermozilla-beta@a2e7f5c935da [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersato
bugs1523104
milestone67.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
bug 1523104: remote: update the demo script to use a local page; r=ato
remote/test/demo.js
--- a/remote/test/demo.js
+++ b/remote/test/demo.js
@@ -8,28 +8,28 @@ async function demo() {
     client = await CDP();
     const {Log, Network, Page} = client;
 
     // receive console.log messages and print them
     Log.enable();
     Log.entryAdded(({entry}) => {
       const {timestamp, level, text, args} = entry;
       const msg = text || args.join(" ");
-      console.log(`${timestamp}\t${level.toUpperCase()}\t${msg}`);
+      console.log(`${new Date(timestamp)}\t${level.toUpperCase()}\t${msg}`);
     });
 
     // turn on network stack logging
     Network.requestWillBeSent((params) => {
       console.log(params.request.url);
     });
 
     // turn on navigation related events, such as DOMContentLoaded et al.
     await Page.enable();
 
-    await Page.navigate({url: "https://sny.no/e/consoledemo.html"});
+    await Page.navigate({url: "data:text/html,test-page<script>console.log('foo');</script><script>'</script>"});
     await Page.loadEventFired();
   } catch (e) {
     console.error(e);
   } finally {
     if (client) {
       await client.close();
     }
   }