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

Side by Side Diff: LayoutTests/fast/forms/file/file-input-capture.html

Issue 18332015: HTML Media Capture: Update implementation, part 2. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@update-media-capture-implementation-part1
Patch Set: Rebase Created 7 years, 5 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 | LayoutTests/fast/forms/file/file-input-capture-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
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <body> 2 <body>
3 <script src="../../js/resources/js-test-pre.js"></script> 3 <script src="../../js/resources/js-test-pre.js"></script>
4 <script> 4 <script>
5 description("Tests the capture attribute of &lt;input type='file'&gt;"); 5 description("Tests the capture attribute of &lt;input type='file'&gt;");
6 6
7 var input = document.createElement("input"); 7 var input = document.createElement("input");
8 8
9 shouldBeTrue("'capture' in input"); 9 shouldBeTrue("'capture' in input");
10 shouldBe("input.capture", "''"); 10 shouldBe("input.capture", "false");
11 shouldBe("input.hasAttribute('capture')", "false");
11 12
12 input.setAttribute("type", "file"); 13 input.setAttribute("type", "file");
13 14
14 shouldBe("input.capture", "'filesystem'"); 15 shouldBe("input.capture", "false");
16 shouldBe("input.hasAttribute('capture')", "false");
15 17
16 input.setAttribute("capture", "CaMerA"); 18 input.setAttribute("capture", true);
17 shouldBe("input.capture", "'camera'"); 19 shouldBe("input.capture", "true");
20 shouldBe("input.hasAttribute('capture')", "true");
18 21
19 input.setAttribute("capture", "camcorder"); 22 input.removeAttribute("capture");
20 shouldBe("input.capture", "'camcorder'"); 23 shouldBe("input.capture", "false");
24 shouldBe("input.hasAttribute('capture')", "false");
21 25
22 input.setAttribute("capture", "MiCroPhonE"); 26 input.setAttribute("capture", "'x'");
23 shouldBe("input.capture", "'microphone'"); 27 shouldBe("input.capture", "true");
28 shouldBe("input.hasAttribute('capture')", "true");
24 29
25 input.setAttribute("capture", "xyzzy"); 30 input.capture = false;
26 shouldBe("input.capture", "'filesystem'"); 31 shouldBe("input.capture", "false");
32 shouldBe("input.hasAttribute('capture')", "false");
27 33
28 input.capture = "CamCorder"; 34 input.capture = true;
29 shouldBe("input.capture", "'camcorder'"); 35 shouldBe("input.capture", "true");
30 shouldBe("input.getAttribute('capture')", "'CamCorder'"); 36 shouldBe("input.hasAttribute('capture')", "true");
31
32 </script> 37 </script>
33 <script src="../../js/resources/js-test-post.js"></script> 38 <script src="../../js/resources/js-test-post.js"></script>
34 </html> 39 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/forms/file/file-input-capture-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698