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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/css/border-image-style-none.html

Issue 1455673002: Add UseCounter for border-image overriding border-widths (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix c&p error Created 5 years, 1 month 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/fast/css/border-image-style-none-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 <script src="../../resources/js-test.js"></script>
3 <script src="../../resources/run-after-layout-and-paint.js"></script>
4 <style>
5 .test {
6 width: 100px;
7 height: 100px;
8 }
9 </style>
10 <div class="test"></div>
11 <script>
12 var BorderImageWithBorderStyleNone = 1026; // From UseCounter.h
13 window.jsTestIsAsync = true;
14
15 shouldBeFalse("window.internals.isUseCounted(document, BorderImageWithBorderSt yleNone)");
16
17 var style = document.querySelector('.test').style;
18
19 // Set a solid border-image; expect no hit
20 style.borderWidth = '20px';
21 style.borderStyle = 'solid';
22 style.borderImage = 'linear-gradient(to bottom, blue, white) 1 repeat';
23
24 runAfterLayoutAndPaint(
25 function() {
26 shouldBeFalse("window.internals.isUseCounted(document, BorderImageWith BorderStyleNone)");
27
28 // Set one border to none but nuke all border widths; expect no hit
29 style.borderWidth = '0px';
30 style.borderTopStyle = 'none';
31
32 runAfterLayoutAndPaint(
33 function() {
34 shouldBeFalse("window.internals.isUseCounted(document, BorderI mageWithBorderStyleNone)");
35
36 // Add fill to trigger more border-image code; expect no hit
37 style.borderImage = 'linear-gradient(to bottom, blue, white) f ill 1 repeat';
38
39 runAfterLayoutAndPaint(
40 function() {
41 shouldBeFalse("window.internals.isUseCounted(document, BorderImageWithBorderStyleNone)");
42
43 // Add a top border width that according to spec shoul d be clamped to zero because
44 // border-top-style is none; expect hit
45 style.borderTopWidth = '10px';
46
47 runAfterLayoutAndPaint(
48 function() {
49 shouldBeTrue("window.internals.isUseCounted(do cument, BorderImageWithBorderStyleNone)");
50 finishJSTest();
51 });
52 });
53 });
54 });
55 </script>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/css/border-image-style-none-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698