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

Side by Side Diff: third_party/WebKit/LayoutTests/ambient-light/rounded-lux-value.html

Issue 2772843002: [DeviceLight] Ensure to round lux value to avoid fingerprinting risk. (Closed)
Patch Set: fix compile Created 3 years, 8 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 unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/ambient-light/rounded-lux-value-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <body>
4 <script src="../resources/js-test.js"></script>
5 <script>
6 description('Tests that the lux value is rounded to avoid fingerprinting risk.') ;
7
8 var mockLightFullPrecision = 10.123456789;
9 var mockLightRounded = 10;
10
11 if (window.testRunner)
12 testRunner.setMockDeviceLight(mockLightFullPrecision);
13 else
14 debug('This test can not be run without the TestRunner');
15
16 var deviceLightEvent;
17 function checkLight(event) {
18 deviceLightEvent = event;
19 shouldBe('deviceLightEvent.value', 'mockLightRounded');
20 }
21
22 function listener(event) {
23 checkLight(event);
24 finishJSTest();
25 }
26
27 window.addEventListener('devicelight', listener);
28 window.jsTestIsAsync = true;
29 </script>
30 </body>
31 </html>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/ambient-light/rounded-lux-value-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698