Bug 1364386 - Update tests; r=nchevobbe
authorJan Odvarko <odvarko@gmail.com>
Wed, 17 May 2017 14:52:11 +0200
changeset 358997 b02281ac790d0bcf240bcf0213d7a1e5502dc274
parent 358996 75bc9f14232552dcad16914b3a7ea289aed98490
child 358998 da0eff4a38219e6e47422c2de6281084a5961bf1
push id42921
push userjodvarko@mozilla.com
push dateThu, 18 May 2017 14:16:55 +0000
treeherderautoland@b02281ac790d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnchevobbe
bugs1364386
milestone55.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 1364386 - Update tests; r=nchevobbe MozReview-Commit-ID: 3iD70SdPECo
devtools/client/webconsole/new-console-output/test/store/search.test.js
--- a/devtools/client/webconsole/new-console-output/test/store/search.test.js
+++ b/devtools/client/webconsole/new-console-output/test/store/search.test.js
@@ -61,16 +61,28 @@ describe("Searching in grips", () => {
 
   describe("Search in logs with net messages", () => {
     it("matches on network messages", () => {
       store.dispatch(actions.filterToggle("net"));
       store.dispatch(actions.filterTextSet("get"));
       expect(getAllMessages(store.getState()).size).toEqual(1);
     });
   });
+
+  describe("Search in frame", () => {
+    it("matches on file name", () => {
+      store.dispatch(actions.filterTextSet("test-console-api.html:1:27"));
+      expect(getAllMessages(store.getState()).size).toEqual(7);
+    });
+
+    it("do not match on full url", () => {
+      store.dispatch(actions.filterTextSet("http://example.com/browser/devtools"));
+      expect(getAllMessages(store.getState()).size).toEqual(0);
+    });
+  });
 });
 
 function prepareBaseStore() {
   const store = setupStore([
     "console.log('foobar', 'test')",
     "console.warn('danger, will robinson!')",
     "console.table(['red', 'green', 'blue']);",
     "console.count('bar')",