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

Unified 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/ambient-light/rounded-lux-value.html
diff --git a/third_party/WebKit/LayoutTests/ambient-light/rounded-lux-value.html b/third_party/WebKit/LayoutTests/ambient-light/rounded-lux-value.html
new file mode 100644
index 0000000000000000000000000000000000000000..39b221753330e992f4a4cfae2f16eaed6be493ff
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/ambient-light/rounded-lux-value.html
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<html>
+<body>
+<script src="../resources/js-test.js"></script>
+<script>
+description('Tests that the lux value is rounded to avoid fingerprinting risk.');
+
+var mockLightFullPrecision = 10.123456789;
+var mockLightRounded = 10;
+
+if (window.testRunner)
+ testRunner.setMockDeviceLight(mockLightFullPrecision);
+else
+ debug('This test can not be run without the TestRunner');
+
+var deviceLightEvent;
+function checkLight(event) {
+ deviceLightEvent = event;
+ shouldBe('deviceLightEvent.value', 'mockLightRounded');
+}
+
+function listener(event) {
+ checkLight(event);
+ finishJSTest();
+}
+
+window.addEventListener('devicelight', listener);
+window.jsTestIsAsync = true;
+</script>
+</body>
+</html>
« 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