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

Unified Diff: sky/tests/lowlevel/attribute-collection.html

Issue 685623002: Move the tests from .html to .sky (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 6 years, 2 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 | « sky/tests/lowlevel/abarth.sky ('k') | sky/tests/lowlevel/attribute-collection.sky » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/tests/lowlevel/attribute-collection.html
diff --git a/sky/tests/lowlevel/attribute-collection.html b/sky/tests/lowlevel/attribute-collection.html
deleted file mode 100644
index 40d940b7f8b650ca3c3903667b5c60c46ccecb8f..0000000000000000000000000000000000000000
--- a/sky/tests/lowlevel/attribute-collection.html
+++ /dev/null
@@ -1,56 +0,0 @@
-<html>
-<link rel="import" href="../resources/mocha.html" />
-<link rel="import" href="../resources/chai.html" />
-<script>
-describe("Attribute collection", function() {
- var div;
- beforeEach(function() {
- div = document.createElement("div");
- });
-
- it("should get by index", function() {
- div.setAttribute("attr0", "value0");
- div.setAttribute("attr1", "value1");
- assert.equal(div.attributes.length, 2);
- assert.equal(div.attributes[0].name, "attr0");
- assert.equal(div.attributes[0].value, "value0");
- assert.equal(div.attributes[1].name, "attr1");
- assert.equal(div.attributes[1].value, "value1");
- });
- it("should get by name", function() {
- div.setAttribute("attr0", "value0");
- div.setAttribute("attr1", "value1");
- assert.equal(div.attributes.length, 2);
- assert.equal(div.attributes.attr0.value, "value0");
- assert.equal(div.attributes.attr1.value, "value1");
- });
- it("should set by name", function() {
- div.setAttribute("attrName", "value0");
- div.attributes.attrName.value = "new value";
- assert.equal(div.getAttribute("attrName"), "new value");
- assert.equal(div.attributes.attrName.value, "new value");
- });
- it("should be case sensitive", function() {
- div.setAttribute("attrName", "value0");
- assert.isUndefined(div.attributes.attrname);
- assert.ok(div.attributes.attrName);
- assert.equal(div.attributes.attrName.value, "value0");
- });
- it("should live update", function() {
- div.setAttribute("attr0", "");
- div.setAttribute("attr1", "");
- div.setAttribute("attr2", "");
- assert.equal(div.attributes.length, 3);
- div.removeAttribute("attr1");
- assert.equal(div.attributes.length, 2);
- assert.equal(div.attributes[0].name, "attr0");
- assert.equal(div.attributes[1].name, "attr2");
- div.setAttribute("attr3", "");
- div.setAttribute("attr2", "value2");
- assert.equal(div.attributes.length, 3);
- assert.equal(div.attributes[2].name, "attr3");
- assert.equal(div.attributes.attr2.value, "value2");
- });
-});
-</script>
-</html>
« no previous file with comments | « sky/tests/lowlevel/abarth.sky ('k') | sky/tests/lowlevel/attribute-collection.sky » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698