This repository has been archived by the owner on Aug 4, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 737786 - 4/5 - Add more tests for ::-moz-placeholder. r=bz
- Loading branch information
1 parent
131fb24
commit 7c8431b
Showing
18 changed files
with
221 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<body> | ||
<input placeholder='foo'> | ||
<textarea placeholder='foo'></textarea> | ||
<input placeholder='foo'> | ||
<textarea placeholder='foo'></textarea> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<!-- | ||
This test checks that setting a background on a ::-moz-placeholder works. | ||
However, given that it is not possible to do an actualy equality check, we | ||
have te check that setting a background doesn't produce the same result | ||
as not setting it. | ||
--> | ||
<style> | ||
:-moz-any(input, textarea).color::-moz-placeholder { | ||
background-color: blue; | ||
} | ||
:-moz-any(input, textarea).gradient::-moz-placeholder { | ||
background: linear-gradient(to right, blue, white, red); | ||
} | ||
</style> | ||
<body> | ||
<input class="color" placeholder='foo'> | ||
<textarea class="color" placeholder='foo'></textarea> | ||
<input class="gradient" placeholder='foo'> | ||
<textarea class="gradient" placeholder='foo'></textarea> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<body> | ||
<input placeholder='foo'> | ||
<textarea placeholder='foo'></textarea> | ||
<input placeholder='this is a quitelongetextforasmallelement'> | ||
<textarea placeholder='this is a quitelongetextforasmallelement'></textarea> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<style> | ||
:-moz-any(input, textarea)::-moz-placeholder { | ||
visibility: hidden; | ||
padding: 20px; | ||
float: right; | ||
overflow: visible; | ||
white-space: pre; | ||
|
||
/* | ||
* This list could be endless given that all non-whitelisted properties | ||
* are restricted. | ||
*/ | ||
} | ||
</style> | ||
<body> | ||
<input placeholder='foo'> | ||
<textarea placeholder='foo'></textarea> | ||
<!-- for overflow and white-space --> | ||
<input placeholder='this is a quitelongetextforasmallelement'> | ||
<textarea placeholder='this is a quitelongetextforasmallelement'></textarea> | ||
</body> | ||
</html> |
17 changes: 17 additions & 0 deletions
17
layout/reftests/css-placeholder/css-simple-styling-ref.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<style> | ||
:-moz-any(input, textarea) { | ||
font: -moz-list; | ||
font-family: mono; | ||
font-style: italic; | ||
color: blue; | ||
word-spacing: 5px; | ||
text-shadow: 1px 1px 1px red; | ||
} | ||
</style> | ||
<body> | ||
<input value='foo bar'> | ||
<textarea>foo bar</textarea> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<!-- | ||
This test checks that a few allowed CSS properties have an effect when | ||
applied to ::-moz-placeholder. | ||
--> | ||
<style> | ||
/* | ||
* We need to set some properties on the <input> because its size will | ||
* depend on its font. | ||
*/ | ||
input, textarea { | ||
font: -moz-list; | ||
font-family: mono; | ||
font-style: italic; | ||
} | ||
|
||
:-moz-any(input, textarea)::-moz-placeholder { | ||
font: -moz-list; | ||
font-family: mono; | ||
font-style: italic; | ||
color: blue; | ||
word-spacing: 5px; | ||
text-shadow: 1px 1px 1px red; | ||
} | ||
</style> | ||
<body> | ||
<input placeholder='foo bar'> | ||
<textarea placeholder='foo bar'></textarea> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<link rel='stylesheet' type='text/css' href='style.css'> | ||
<style> | ||
input::-moz-placeholder { | ||
display: inline; | ||
} | ||
</style> | ||
<body> | ||
<input placeholder='foo'> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<link rel='stylesheet' type='text/css' href='style.css'> | ||
<style> | ||
input::-moz-placeholder { | ||
opacity: 0.1; | ||
} | ||
</style> | ||
<body> | ||
<input placeholder='foo'> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,6 @@ | ||
include input/reftest.list | ||
include textarea/reftest.list | ||
|
||
== css-restrictions.html css-restrictions-ref.html | ||
== css-simple-styling.html css-simple-styling-ref.html | ||
!= css-background.html css-background-ref.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<link rel='stylesheet' type='text/css' href='style.css'> | ||
<style> | ||
textarea::-moz-placeholder { | ||
display: inline; | ||
} | ||
</style> | ||
<body> | ||
<textarea placeholder='foo'></textarea> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<link rel='stylesheet' type='text/css' href='style.css'> | ||
<style> | ||
textarea::-moz-placeholder { | ||
opacity: 0.1; | ||
} | ||
</style> | ||
<body> | ||
<textarea placeholder='foo'></textarea> | ||
</body> | ||
</html> |
12 changes: 12 additions & 0 deletions
12
layout/reftests/css-placeholder/textarea/css-resize-ref.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<link rel='stylesheet' type='text/css' href='style.css'> | ||
<style> | ||
textarea { | ||
resize: none; | ||
} | ||
</style> | ||
<body> | ||
<textarea class='ref'>foo</textarea> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<!-- | ||
resize shouldn't be allowed on the ::-moz-placeholder. | ||
--> | ||
<link rel='stylesheet' type='text/css' href='style.css'> | ||
<style> | ||
textarea { | ||
resize: none; | ||
} | ||
textarea::-moz-placeholder { | ||
resize: both; | ||
} | ||
</style> | ||
<body> | ||
<textarea placeholder='foo'></textarea> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<!DOCTYPE html> | ||
<html dir='rtl'> | ||
<link rel='stylesheet' type='text/css' href='placeholder-style.css'> | ||
<body> | ||
<input class='placeholder' value='foo'> | ||
<textarea class='placeholder' >foo</textarea> | ||
</body> | ||
</html> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<!DOCTYPE html> | ||
<html dir='rtl'> | ||
<body> | ||
<input placeholder='foo'> | ||
<textarea placeholder='foo'></textarea> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters