Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: libadblockplus-android-tests/src/org/adblockplus/libadblockplus/tests/NotificationTest.java

Issue 29536629: Issue 5556 - Update to use libadblockplus revision hg:566f64c8a2a8 (Closed) Base URL: github.com:abby-sergz/libadblockplus-android.git
Patch Set: update dependencies Created Sept. 8, 2017, 9:50 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * This file is part of Adblock Plus <https://adblockplus.org/>, 2 * This file is part of Adblock Plus <https://adblockplus.org/>,
3 * Copyright (C) 2006-present eyeo GmbH 3 * Copyright (C) 2006-present eyeo GmbH
4 * 4 *
5 * Adblock Plus is free software: you can redistribute it and/or modify 5 * Adblock Plus is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as 6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 * 8 *
9 * Adblock Plus is distributed in the hope that it will be useful, 9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 16 matching lines...) Expand all
27 public class NotificationTest extends BaseFilterEngineTest 27 public class NotificationTest extends BaseFilterEngineTest
28 { 28 {
29 @Override 29 @Override
30 protected WebRequest createWebRequest() 30 protected WebRequest createWebRequest()
31 { 31 {
32 return new LazyWebRequest(); 32 return new LazyWebRequest();
33 } 33 }
34 34
35 protected void addNotification(String notification) 35 protected void addNotification(String notification)
36 { 36 {
37 jsEngine.evaluate( 37 platform.getJsEngine().evaluate(
38 "(function()\n" + 38 "(function()\n" +
39 "{\n" + 39 "{\n" +
40 "require('notification').Notification.addNotification(" + notification + " );\n" + 40 "require('notification').Notification.addNotification(" + notification + " );\n" +
41 "})();"); 41 "})();");
42 } 42 }
43 43
44 private class LocalShowNotificationCallback extends ShowNotificationCallback 44 private class LocalShowNotificationCallback extends ShowNotificationCallback
45 { 45 {
46 private Notification retValue; 46 private Notification retValue;
47 47
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 116
117 Notification notification = peekNotification(""); 117 Notification notification = peekNotification("");
118 assertNotNull(notification); 118 assertNotNull(notification);
119 119
120 Thread.sleep(1000); 120 Thread.sleep(1000);
121 notification.markAsShown(); 121 notification.markAsShown();
122 122
123 assertNull(peekNotification("")); 123 assertNull(peekNotification(""));
124 } 124 }
125 } 125 }
OLDNEW

Powered by Google App Engine
This is Rietveld