Remove Sky tests that we don't intend to port to the new world
These tests are for aspects of the Sky engine we plan to remove along with support for the old world. R=ianh@google.com Review URL: https://codereview.chromium.org/1215063003.
This commit is contained in:
@@ -1,38 +1,2 @@
|
||||
|
||||
# These tests need more basic testing support plumbed right into the
|
||||
# platform, which we don't currently have:
|
||||
https://github.com/domokit/mojo/issues/15 parser/cr.sky [ Skip ]
|
||||
https://github.com/domokit/mojo/issues/15 parser/empty.sky [ Skip ]
|
||||
#https://github.com/domokit/mojo/issues/15 parser/utf16.sky [ Skip ]
|
||||
|
||||
# These tests fail
|
||||
https://github.com/domokit/mojo/issues/14 parser/normaliser-null.sky [ Skip ]
|
||||
https://github.com/domokit/mojo/issues/14 parser/utf16.sky [ Skip ]
|
||||
https://github.com/domokit/mojo/issues/16 parser/normaliser-crlf.sky [ Skip ]
|
||||
|
||||
# This test depends on events.md being implemented
|
||||
crbug.com/1 events/dispatcher.sky [ Skip ]
|
||||
|
||||
# These tests broke during the Dart migration
|
||||
crbug.com/2 animation/basic-imperative.sky [ Skip ]
|
||||
crbug.com/2 animation/basic-transition.sky [ Skip ]
|
||||
crbug.com/2 events/gesture-events.sky [ Skip ]
|
||||
crbug.com/2 events/pointer-events.sky [ Skip ]
|
||||
crbug.com/2 layout/margins-absolute.sky [ Skip ]
|
||||
crbug.com/2 layout/margins.sky [ Skip ]
|
||||
crbug.com/2 lowlevel/createElement.sky [ Skip ]
|
||||
crbug.com/2 modules/application.sky [ Skip ]
|
||||
crbug.com/2 modules/instance-of-application.sky [ Skip ]
|
||||
crbug.com/2 modules/instance-of-module.sky [ Skip ]
|
||||
crbug.com/2 modules/load-event.sky [ Skip ]
|
||||
crbug.com/2 modules/modules.sky [ Skip ]
|
||||
crbug.com/2 modules/script-import.sky [ Skip ]
|
||||
crbug.com/2 parser/script.sky [ Skip ]
|
||||
crbug.com/2 services/iframe-service-provider.sky [ Skip ]
|
||||
|
||||
# Started failing on DEPS roll.
|
||||
# https://codereview.chromium.org/1001833005/
|
||||
https://github.com/domokit/mojo/issues/64 lowlevel/layers.sky [ Skip ]
|
||||
|
||||
# Flaky
|
||||
https://github.com/domokit/mojo/issues/62 custom-elements/registration.sky [ Skip ]
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
Running 1 tests
|
||||
ok 1 Element.animate opacity should amimate from 0 to 1
|
||||
1 tests
|
||||
1 pass
|
||||
0 fail
|
||||
@@ -1,16 +0,0 @@
|
||||
<sky>
|
||||
<import src="../resources/chai.sky" />
|
||||
<import src="../resources/mocha.sky" />
|
||||
<div id="example">Hello, Sky</div>
|
||||
<script>
|
||||
var example = document.getElementById('example');
|
||||
|
||||
describe('Element.animate opacity', function() {
|
||||
it('should amimate from 0 to 1', function() {
|
||||
example.animate([{ opacity: 0 }, { opacity: 1}], 2000);
|
||||
internals.pauseAnimations(.5);
|
||||
assert.equal(.25, getComputedStyle(example).opacity);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</sky>
|
||||
@@ -1,5 +0,0 @@
|
||||
Running 1 tests
|
||||
ok 1 width should transition from 100px to 200px
|
||||
1 tests
|
||||
1 pass
|
||||
0 fail
|
||||
@@ -1,31 +0,0 @@
|
||||
<sky>
|
||||
<import src="../resources/chai.sky" />
|
||||
<import src="../resources/mocha.sky" />
|
||||
<div></div>
|
||||
<style>
|
||||
div {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
background: red;
|
||||
position: relative;
|
||||
transition: width 2s;
|
||||
transition-timing-function: linear;
|
||||
}
|
||||
|
||||
div#example {
|
||||
width: 200px;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
var example = document.querySelector('div');
|
||||
example.offsetWidth; // force a style resolution so that next line's assigment triggers the transition
|
||||
example.id = "example";
|
||||
|
||||
describe('width', function() {
|
||||
it('should transition from 100px to 200px', function() {
|
||||
internals.pauseAnimations(1);
|
||||
assert.equal('150px', getComputedStyle(example).width);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</sky>
|
||||
@@ -1,6 +0,0 @@
|
||||
CONSOLE: unittest-suite-wait-for-done
|
||||
CONSOLE: PASS: callbacks should be called
|
||||
CONSOLE:
|
||||
CONSOLE: All 1 tests passed.
|
||||
CONSOLE: unittest-suite-success
|
||||
DONE
|
||||
@@ -1,55 +0,0 @@
|
||||
<sky>
|
||||
<script>
|
||||
import "../resources/third_party/unittest/unittest.dart";
|
||||
import "../resources/unit.dart";
|
||||
|
||||
import "dart:sky";
|
||||
|
||||
class FooElement extends Element {
|
||||
final String tagName = "foo";
|
||||
|
||||
attachedCallback() {
|
||||
++attachedCallbackCount;
|
||||
}
|
||||
|
||||
detachedCallback() {
|
||||
++detachedCallbackCount;
|
||||
}
|
||||
|
||||
attributeChangedCallback(String name, String oldValue, String newValue) {
|
||||
++attributeChangedCallbackCount;
|
||||
}
|
||||
|
||||
int attachedCallbackCount = 0;
|
||||
int detachedCallbackCount = 0;
|
||||
int attributeChangedCallbackCount = 0;
|
||||
}
|
||||
|
||||
|
||||
void main() {
|
||||
initUnit();
|
||||
|
||||
document.registerElement("foo", FooElement);
|
||||
|
||||
test("callbacks should be called", () {
|
||||
Element sky = document.querySelector("sky");
|
||||
FooElement foo = document.createElement("foo");
|
||||
expect(foo.attachedCallbackCount, equals(0));
|
||||
expect(foo.detachedCallbackCount, equals(0));
|
||||
expect(foo.attributeChangedCallbackCount, equals(0));
|
||||
sky.appendChild(foo);
|
||||
expect(foo.attachedCallbackCount, equals(1));
|
||||
expect(foo.detachedCallbackCount, equals(0));
|
||||
expect(foo.attributeChangedCallbackCount, equals(0));
|
||||
foo.setAttribute("bar", "baz");
|
||||
expect(foo.attachedCallbackCount, equals(1));
|
||||
expect(foo.detachedCallbackCount, equals(0));
|
||||
expect(foo.attributeChangedCallbackCount, equals(1));
|
||||
foo.remove();
|
||||
expect(foo.attachedCallbackCount, equals(1));
|
||||
expect(foo.detachedCallbackCount, equals(1));
|
||||
expect(foo.attributeChangedCallbackCount, equals(1));
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</sky>
|
||||
@@ -1,2 +0,0 @@
|
||||
CONSOLE: PASS: FooElement attached.
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
<import src="../resources/dump-as-text.sky" />
|
||||
<script>
|
||||
import "dart:sky";
|
||||
|
||||
class FooElement extends Element {
|
||||
final String tagName = "foo";
|
||||
|
||||
attachedCallback() {
|
||||
print("PASS: FooElement attached.");
|
||||
}
|
||||
|
||||
detachedCallback() {
|
||||
}
|
||||
|
||||
attributeChangedCallbackCount(String name, String oldValue, String newValue) {
|
||||
}
|
||||
}
|
||||
|
||||
void main() {
|
||||
document.registerElement("foo", FooElement);
|
||||
}
|
||||
</script>
|
||||
<foo />
|
||||
<script>
|
||||
// This script element creates a microtask checkpoint and ensures that
|
||||
// the <foo /> attached callback runs before the test ends.
|
||||
</script>
|
||||
@@ -1 +0,0 @@
|
||||
PASS
|
||||
@@ -1 +0,0 @@
|
||||
PASS
|
||||
@@ -1,8 +0,0 @@
|
||||
<script>
|
||||
import "resources/lib-with-part.dart" as lib;
|
||||
import "dart:sky.internals" as internals;
|
||||
|
||||
void main() {
|
||||
internals.notifyTestComplete(lib.kFirst + lib.kSecond);
|
||||
}
|
||||
</script>>
|
||||
@@ -1,8 +0,0 @@
|
||||
<script>
|
||||
import "resources/lib.dart" as lib;
|
||||
import "dart:sky.internals" as internals;
|
||||
|
||||
void main() {
|
||||
internals.notifyTestComplete(lib.kResult);
|
||||
}
|
||||
</script>>
|
||||
@@ -1 +0,0 @@
|
||||
PASS
|
||||
@@ -1,14 +0,0 @@
|
||||
<script>
|
||||
import "dart:mirrors";
|
||||
import "dart:sky.internals" as internals;
|
||||
|
||||
// Regression test for the embedder not setting up the root library.
|
||||
// Used to crash.
|
||||
|
||||
void main() {
|
||||
if (currentMirrorSystem().isolate.rootLibrary == null) {
|
||||
throw "Missing root library";
|
||||
}
|
||||
internals.notifyTestComplete("PASS");
|
||||
}
|
||||
</script>>
|
||||
@@ -1,5 +0,0 @@
|
||||
library test.lib_with_part;
|
||||
|
||||
part "part.dart";
|
||||
|
||||
const kFirst = "PA";
|
||||
@@ -1,3 +0,0 @@
|
||||
library test.lib;
|
||||
|
||||
const kResult = "PASS";
|
||||
@@ -1,3 +0,0 @@
|
||||
part of test.lib_with_part;
|
||||
|
||||
const kSecond = "SS";
|
||||
@@ -1,2 +0,0 @@
|
||||
#BEGIN
|
||||
A
|
||||
@@ -1,22 +0,0 @@
|
||||
<body>
|
||||
<style>
|
||||
.blue {
|
||||
border: 2px solid blue;
|
||||
}
|
||||
</style>
|
||||
<p class="blue" contenteditable></p>
|
||||
<script>
|
||||
import "../resources/event-sender.dart" as eventSender;
|
||||
import "dart:sky";
|
||||
import "package:mojom/mojo/input_key_codes.mojom.dart";
|
||||
|
||||
void main() {
|
||||
var control = document.querySelector('.blue');
|
||||
control.focus();
|
||||
eventSender.keyDown(KeyboardCode_A);
|
||||
eventSender.keyDown(KeyboardCode_B);
|
||||
eventSender.keyDown(KeyboardCode_BACK);
|
||||
eventSender.done();
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
@@ -1,6 +0,0 @@
|
||||
CONSOLE: unittest-suite-wait-for-done
|
||||
CONSOLE: PASS: remains the same after adding block elements and removing them
|
||||
CONSOLE:
|
||||
CONSOLE: All 1 tests passed.
|
||||
CONSOLE: unittest-suite-success
|
||||
DONE
|
||||
@@ -1,31 +0,0 @@
|
||||
<sky>
|
||||
This test verifies that the height of an editable block remains the same after adding block elements and removing them.
|
||||
<div contenteditable="true" style="border: solid blue" id="test"></div>
|
||||
<script>
|
||||
import "../resources/third_party/unittest/unittest.dart";
|
||||
import "../resources/unit.dart";
|
||||
|
||||
import "dart:async";
|
||||
import "dart:sky";
|
||||
|
||||
void main() {
|
||||
initUnit();
|
||||
|
||||
test("remains the same after adding block elements and removing them", () {
|
||||
var elem = document.getElementById("test");
|
||||
var originalHeight = elem.offsetHeight;
|
||||
var d = elem.appendChild(document.createElement('div'));
|
||||
d.appendChild(new Text('aaa'));
|
||||
d = elem.appendChild(document.createElement('div'));
|
||||
d.appendChild(new Text('bbb'));
|
||||
var newHeight = elem.offsetHeight;
|
||||
|
||||
elem.removeChildren();
|
||||
|
||||
new Timer(Duration.ZERO, expectAsync(() {
|
||||
expect(elem.offsetHeight, equals(originalHeight));
|
||||
}));
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</sky>
|
||||
@@ -1,2 +0,0 @@
|
||||
#BEGIN
|
||||
ABX
|
||||
@@ -1,29 +0,0 @@
|
||||
<body>
|
||||
<style>
|
||||
.blue {
|
||||
border: 2px solid blue;
|
||||
}
|
||||
</style>
|
||||
<p class="blue" contenteditable></p>
|
||||
<script>
|
||||
import "../resources/event-sender.dart" as eventSender;
|
||||
import "dart:sky";
|
||||
import "package:mojom/mojo/input_event_constants.mojom.dart";
|
||||
import "package:mojom/mojo/input_key_codes.mojom.dart";
|
||||
|
||||
void main() {
|
||||
var control = document.querySelector('.blue');
|
||||
control.focus();
|
||||
eventSender.keyDown(KeyboardCode_A);
|
||||
eventSender.keyDown(KeyboardCode_B);
|
||||
eventSender.keyDown(KeyboardCode_C);
|
||||
eventSender.keyDown(KeyboardCode_D);
|
||||
eventSender.keyDown(KeyboardCode_E);
|
||||
eventSender.keyDown(KeyboardCode_LEFT, EventFlags_SHIFT_DOWN);
|
||||
eventSender.keyDown(KeyboardCode_LEFT, EventFlags_SHIFT_DOWN);
|
||||
eventSender.keyDown(KeyboardCode_LEFT, EventFlags_SHIFT_DOWN);
|
||||
eventSender.keyDown(KeyboardCode_X);
|
||||
eventSender.done();
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
@@ -1,2 +0,0 @@
|
||||
#BEGIN
|
||||
AB
|
||||
@@ -1,29 +0,0 @@
|
||||
<body>
|
||||
<style>
|
||||
.blue {
|
||||
border: 2px solid blue;
|
||||
}
|
||||
</style>
|
||||
<p class="blue" contenteditable></p>
|
||||
<script>
|
||||
import "../resources/event-sender.dart" as eventSender;
|
||||
import "dart:sky";
|
||||
import "package:mojom/mojo/input_event_constants.mojom.dart";
|
||||
import "package:mojom/mojo/input_key_codes.mojom.dart";
|
||||
|
||||
void main() {
|
||||
var control = document.querySelector('.blue');
|
||||
control.focus();
|
||||
eventSender.keyDown(KeyboardCode_A);
|
||||
eventSender.keyDown(KeyboardCode_B);
|
||||
eventSender.keyDown(KeyboardCode_C);
|
||||
eventSender.keyDown(KeyboardCode_D);
|
||||
eventSender.keyDown(KeyboardCode_E);
|
||||
eventSender.keyDown(KeyboardCode_LEFT, EventFlags_SHIFT_DOWN);
|
||||
eventSender.keyDown(KeyboardCode_LEFT, EventFlags_SHIFT_DOWN);
|
||||
eventSender.keyDown(KeyboardCode_LEFT, EventFlags_SHIFT_DOWN);
|
||||
eventSender.keyDown(KeyboardCode_BACK);
|
||||
eventSender.done();
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
@@ -1,2 +0,0 @@
|
||||
#BEGIN
|
||||
AB
|
||||
@@ -1,22 +0,0 @@
|
||||
<body>
|
||||
<style>
|
||||
.blue {
|
||||
border: 2px solid blue;
|
||||
}
|
||||
</style>
|
||||
<p class="blue" contenteditable></p>
|
||||
<script>
|
||||
import "../resources/event-sender.dart" as eventSender;
|
||||
import "dart:sky";
|
||||
import "package:mojom/mojo/input_event_constants.mojom.dart";
|
||||
import "package:mojom/mojo/input_key_codes.mojom.dart";
|
||||
|
||||
void main() {
|
||||
var control = document.querySelector('.blue');
|
||||
control.focus();
|
||||
eventSender.keyDown(KeyboardCode_A);
|
||||
eventSender.keyDown(KeyboardCode_B);
|
||||
eventSender.done();
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
@@ -1,6 +0,0 @@
|
||||
CONSOLE: unittest-suite-wait-for-done
|
||||
CONSOLE: PASS: should be able to dispatch
|
||||
CONSOLE:
|
||||
CONSOLE: All 1 tests passed.
|
||||
CONSOLE: unittest-suite-success
|
||||
DONE
|
||||
@@ -1,35 +0,0 @@
|
||||
<script>
|
||||
import "../resources/third_party/unittest/unittest.dart";
|
||||
import "../resources/unit.dart";
|
||||
|
||||
import "dart:sky";
|
||||
|
||||
class MyEvent extends Event {
|
||||
MyEvent() : super(type: "awesome", bubbles: true);
|
||||
|
||||
bool get isCustom => true;
|
||||
}
|
||||
|
||||
void main() {
|
||||
initUnit();
|
||||
|
||||
test("should be able to dispatch", () {
|
||||
var event = new MyEvent();
|
||||
expect(event.isCustom, isTrue);
|
||||
expect(event.type, equals("awesome"));
|
||||
expect(event.bubbles, isTrue);
|
||||
expect(event.cancelable, isFalse);
|
||||
expect(event.isCustom, isTrue);
|
||||
|
||||
bool gotEvent = false;
|
||||
var element = document.createElement("div");
|
||||
element.addEventListener("awesome", (e) {
|
||||
expect(e, equals(event));
|
||||
expect(event.isCustom, isTrue);
|
||||
gotEvent = true;
|
||||
});
|
||||
element.dispatchEvent(event);
|
||||
expect(gotEvent, isTrue);
|
||||
});
|
||||
}
|
||||
</script>
|
||||
@@ -1,6 +0,0 @@
|
||||
Running 2 tests
|
||||
ok 1 Gesture events should be creatable
|
||||
ok 2 Gesture events should be dispatchable
|
||||
2 tests
|
||||
2 pass
|
||||
0 fail
|
||||
@@ -1,24 +0,0 @@
|
||||
<sky>
|
||||
<import src="../resources/chai.sky" />
|
||||
<import src="../resources/mocha.sky" />
|
||||
<div id="target" />
|
||||
<script>
|
||||
describe("Gesture events", function() {
|
||||
it("should be creatable", function() {
|
||||
var event = new GestureEvent("tap");
|
||||
assert.ok(event);
|
||||
});
|
||||
|
||||
it("should be dispatchable", function() {
|
||||
var div = document.getElementById("target");
|
||||
var marker = false;
|
||||
div.addEventListener("tap", function(event) {
|
||||
assert.instanceOf(event, GestureEvent);
|
||||
marker = true;
|
||||
});
|
||||
div.dispatchEvent(new GestureEvent("tap"));
|
||||
assert.isTrue(marker);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</sky>
|
||||
@@ -1,5 +0,0 @@
|
||||
Running 1 tests
|
||||
ok 1 Pointer events should be constructable
|
||||
1 tests
|
||||
1 pass
|
||||
0 fail
|
||||
@@ -1,16 +0,0 @@
|
||||
<sky>
|
||||
<import src="../resources/chai.sky" />
|
||||
<import src="../resources/mocha.sky" />
|
||||
<script>
|
||||
describe("Pointer events", function() {
|
||||
it("should be constructable", function() {
|
||||
var event = new PointerEvent("pointerdown", {
|
||||
kind: "touch",
|
||||
});
|
||||
assert.ok(event);
|
||||
assert.equal(event.kind, "touch");
|
||||
assert.equal(event.radiusMajor, 0);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</sky>
|
||||
@@ -1,13 +0,0 @@
|
||||
<foo>
|
||||
<import src="../resources/run-after-display.sky" />
|
||||
This is a reftest.
|
||||
<script>
|
||||
import "dart:sky.internals" as internals;
|
||||
|
||||
void main() {
|
||||
runAfterDisplay(() {
|
||||
internals.notifyTestComplete("");
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</foo>
|
||||
@@ -1,18 +0,0 @@
|
||||
<foo>
|
||||
<style>
|
||||
foo {
|
||||
background-color: black;
|
||||
}
|
||||
</style>
|
||||
<import src="../resources/run-after-display.sky" />
|
||||
This is a mismatch reftest.
|
||||
<script>
|
||||
import "dart:sky.internals" as internals;
|
||||
|
||||
void main() {
|
||||
runAfterDisplay(() {
|
||||
internals.notifyTestComplete("");
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</foo>
|
||||
@@ -1,18 +0,0 @@
|
||||
<foo>
|
||||
<style>
|
||||
foo {
|
||||
background-color: black;
|
||||
}
|
||||
</style>
|
||||
<import src="../resources/run-after-display.sky" />
|
||||
<p>This is a mismatch reftest. Should not match.</p>
|
||||
<script>
|
||||
import "dart:sky.internals" as internals;
|
||||
|
||||
void main() {
|
||||
runAfterDisplay(() {
|
||||
internals.notifyTestComplete("");
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</foo>
|
||||
@@ -1,13 +0,0 @@
|
||||
<foo>
|
||||
<import src="../resources/run-after-display.sky" />
|
||||
This is a reftest.
|
||||
<script>
|
||||
import "dart:sky.internals" as internals;
|
||||
|
||||
void main() {
|
||||
runAfterDisplay(() {
|
||||
internals.notifyTestComplete("");
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</foo>
|
||||
@@ -1,163 +0,0 @@
|
||||
ServerRoot "/usr"
|
||||
|
||||
LockFile "/tmp/WebKit/httpd.lock"
|
||||
PidFile "/tmp/WebKit/httpd.pid"
|
||||
ScoreBoardFile "/tmp/WebKit/httpd.scoreboard"
|
||||
|
||||
Timeout 300
|
||||
KeepAlive On
|
||||
MaxKeepAliveRequests 100
|
||||
KeepAliveTimeout 15
|
||||
|
||||
MinSpareServers 1
|
||||
MaxSpareServers 5
|
||||
StartServers 1
|
||||
MaxClients 150
|
||||
MaxRequestsPerChild 100000
|
||||
|
||||
LoadModule mime_module /usr/lib/apache2/modules/mod_mime.so
|
||||
LoadModule negotiation_module /usr/lib/apache2/modules/mod_negotiation.so
|
||||
LoadModule include_module /usr/lib/apache2/modules/mod_include.so
|
||||
LoadModule cgi_module /usr/lib/apache2/modules/mod_cgi.so
|
||||
LoadModule asis_module /usr/lib/apache2/modules/mod_asis.so
|
||||
LoadModule imagemap_module /usr/lib/apache2/modules/mod_imagemap.so
|
||||
LoadModule actions_module /usr/lib/apache2/modules/mod_actions.so
|
||||
LoadModule alias_module /usr/lib/apache2/modules/mod_alias.so
|
||||
LoadModule rewrite_module /usr/lib/apache2/modules/mod_rewrite.so
|
||||
LoadModule authz_host_module /usr/lib/apache2/modules/mod_authz_host.so
|
||||
LoadModule headers_module /usr/lib/apache2/modules/mod_headers.so
|
||||
LoadModule ssl_module /usr/lib/apache2/modules/mod_ssl.so
|
||||
LoadModule php5_module /usr/lib/apache2/modules/libphp5.so
|
||||
LoadModule autoindex_module /usr/lib/apache2/modules/mod_autoindex.so
|
||||
|
||||
ServerName 127.0.0.1
|
||||
|
||||
<Directory />
|
||||
Options Indexes FollowSymLinks MultiViews ExecCGI Includes
|
||||
AllowOverride All
|
||||
Order allow,deny
|
||||
Allow from all
|
||||
</Directory>
|
||||
|
||||
AccessFileName .htaccess
|
||||
|
||||
<Files ~ "^\.([Hh][Tt]|[Dd][Ss]_[Ss])">
|
||||
Order allow,deny
|
||||
Deny from all
|
||||
Satisfy All
|
||||
</Files>
|
||||
|
||||
UseCanonicalName On
|
||||
DefaultType text/plain
|
||||
HostnameLookups Off
|
||||
|
||||
LogLevel warn
|
||||
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
|
||||
LogFormat "%h %l %u %t \"%r\" %>s %b" common
|
||||
LogFormat "%{Referer}i -> %U" referer
|
||||
LogFormat "%{User-agent}i" agent
|
||||
|
||||
ServerSignature On
|
||||
|
||||
<IfModule mod_alias.c>
|
||||
</IfModule>
|
||||
|
||||
<IfModule mod_headers.c>
|
||||
Header unset ETag
|
||||
Header set Cache-Control "max-age=0, no-cache, no-store, must-revalidate"
|
||||
Header set Pragma "no-cache"
|
||||
Header set Expires "Wed, 13 Jul 1972 03:00:00 GMT"
|
||||
</IfModule>
|
||||
|
||||
<IfModule mod_mime.c>
|
||||
AddLanguage da .dk
|
||||
AddLanguage nl .nl
|
||||
AddLanguage en .en
|
||||
AddLanguage et .ee
|
||||
AddLanguage fr .fr
|
||||
AddLanguage de .de
|
||||
AddLanguage el .el
|
||||
AddLanguage he .he
|
||||
AddCharset ISO-8859-8 .iso8859-8
|
||||
AddLanguage it .it
|
||||
AddLanguage ja .ja
|
||||
AddCharset ISO-2022-JP .jis
|
||||
AddLanguage kr .kr
|
||||
AddCharset ISO-2022-KR .iso-kr
|
||||
AddLanguage nn .nn
|
||||
AddLanguage no .no
|
||||
AddLanguage pl .po
|
||||
AddCharset ISO-8859-2 .iso-pl
|
||||
AddLanguage pt .pt
|
||||
AddLanguage pt-br .pt-br
|
||||
AddLanguage ltz .lu
|
||||
AddLanguage ca .ca
|
||||
AddLanguage es .es
|
||||
AddLanguage sv .sv
|
||||
AddLanguage cs .cz .cs
|
||||
AddLanguage ru .ru
|
||||
AddLanguage zh-TW .zh-tw
|
||||
AddCharset Big5 .Big5 .big5
|
||||
AddCharset WINDOWS-1251 .cp-1251
|
||||
AddCharset CP866 .cp866
|
||||
AddCharset ISO-8859-5 .iso-ru
|
||||
AddCharset KOI8-R .koi8-r
|
||||
AddCharset UCS-2 .ucs2
|
||||
AddCharset UCS-4 .ucs4
|
||||
AddCharset UTF-8 .utf8
|
||||
|
||||
<IfModule mod_negotiation.c>
|
||||
LanguagePriority en da nl et fr de el it ja kr no pl pt pt-br ru ltz ca es sv tw
|
||||
</IfModule>
|
||||
|
||||
AddType application/x-tar .tgz
|
||||
|
||||
AddEncoding x-compress .Z
|
||||
AddEncoding x-gzip .gz .tgz
|
||||
|
||||
AddHandler cgi-script .cgi .pl
|
||||
|
||||
AddType text/html .shtml
|
||||
AddHandler server-parsed .shtml
|
||||
|
||||
AddHandler send-as-is asis
|
||||
</IfModule>
|
||||
|
||||
<IfModule mod_php5.c>
|
||||
AddType application/x-httpd-php .php
|
||||
AddType application/x-httpd-php .bat
|
||||
AddType application/x-httpd-php-source .phps
|
||||
|
||||
<IfModule mod_dir.c>
|
||||
DirectoryIndex index.html index.php
|
||||
</IfModule>
|
||||
|
||||
php_flag log_errors on
|
||||
php_flag short_open_tag on
|
||||
</IfModule>
|
||||
|
||||
<IfModule mod_rewrite.c>
|
||||
RewriteEngine On
|
||||
RewriteCond %{REQUEST_METHOD} ^TRACE
|
||||
RewriteRule .* - [F]
|
||||
</IfModule>
|
||||
|
||||
<VirtualHost *:8443>
|
||||
ServerName 127.0.0.1
|
||||
SSLEngine On
|
||||
</VirtualHost>
|
||||
|
||||
#
|
||||
# Apple-specific filesystem protection.
|
||||
#
|
||||
<Files "rsrc">
|
||||
Order allow,deny
|
||||
Deny from all
|
||||
Satisfy All
|
||||
</Files>
|
||||
|
||||
<Directory ~ ".*\.\.namedfork">
|
||||
Order allow,deny
|
||||
Deny from all
|
||||
Satisfy All
|
||||
</Directory>
|
||||
@@ -1,148 +0,0 @@
|
||||
ServerTokens OS
|
||||
ServerRoot "/usr/lib/apache2"
|
||||
|
||||
PidFile "/tmp/WebKit/httpd.pid"
|
||||
ScoreBoardFile "/tmp/WebKit/httpd.scoreboard"
|
||||
|
||||
Timeout 300
|
||||
KeepAlive On
|
||||
MaxKeepAliveRequests 100
|
||||
KeepAliveTimeout 15
|
||||
|
||||
MinSpareServers 1
|
||||
MaxSpareServers 5
|
||||
StartServers 1
|
||||
MaxClients 150
|
||||
MaxRequestsPerChild 100000
|
||||
|
||||
LoadModule mpm_prefork_module modules/mod_mpm_prefork.so
|
||||
LoadModule authz_core_module modules/mod_authz_core.so
|
||||
LoadModule authz_host_module modules/mod_authz_host.so
|
||||
LoadModule include_module modules/mod_include.so
|
||||
LoadModule headers_module modules/mod_headers.so
|
||||
LoadModule mime_module modules/mod_mime.so
|
||||
LoadModule negotiation_module modules/mod_negotiation.so
|
||||
LoadModule actions_module modules/mod_actions.so
|
||||
LoadModule alias_module modules/mod_alias.so
|
||||
LoadModule rewrite_module modules/mod_rewrite.so
|
||||
LoadModule cgi_module modules/mod_cgi.so
|
||||
LoadModule ssl_module modules/mod_ssl.so
|
||||
LoadModule php5_module modules/libphp5.so
|
||||
LoadModule asis_module modules/mod_asis.so
|
||||
|
||||
ServerName 127.0.0.1
|
||||
|
||||
<Directory />
|
||||
Options Indexes FollowSymLinks MultiViews ExecCGI Includes
|
||||
AllowOverride All
|
||||
Require all granted
|
||||
</Directory>
|
||||
|
||||
AccessFileName .htaccess
|
||||
|
||||
<Files ~ "^\.([Hh][Tt]|[Dd][Ss]_[Ss])">
|
||||
Require all denied
|
||||
</Files>
|
||||
|
||||
UseCanonicalName On
|
||||
HostnameLookups Off
|
||||
|
||||
TypesConfig /etc/mime.types
|
||||
|
||||
LogLevel warn
|
||||
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
|
||||
LogFormat "%h %l %u %t \"%r\" %>s %b" common
|
||||
LogFormat "%{Referer}i -> %U" referer
|
||||
LogFormat "%{User-agent}i" agent
|
||||
ErrorLog /tmp/WebKit/error_log
|
||||
|
||||
ServerSignature On
|
||||
|
||||
AddLanguage ca .ca
|
||||
AddLanguage cs .cz .cs
|
||||
AddLanguage da .dk
|
||||
AddLanguage de .de
|
||||
AddLanguage el .el
|
||||
AddLanguage en .en
|
||||
AddLanguage eo .eo
|
||||
AddLanguage es .es
|
||||
AddLanguage et .et
|
||||
AddLanguage fr .fr
|
||||
AddLanguage he .he
|
||||
AddLanguage hr .hr
|
||||
AddLanguage it .it
|
||||
AddLanguage ja .ja
|
||||
AddLanguage ko .ko
|
||||
AddLanguage ltz .ltz
|
||||
AddLanguage nl .nl
|
||||
AddLanguage nn .nn
|
||||
AddLanguage no .no
|
||||
AddLanguage pl .po
|
||||
AddLanguage pt .pt
|
||||
AddLanguage pt-BR .pt-br
|
||||
AddLanguage ru .ru
|
||||
AddLanguage sv .sv
|
||||
AddLanguage zh-CN .zh-cn
|
||||
AddLanguage zh-TW .zh-tw
|
||||
AddCharset Big5 .Big5 .big5
|
||||
AddCharset WINDOWS-1251 .cp-1251
|
||||
AddCharset CP866 .cp866
|
||||
AddCharset ISO-8859-5 .iso-ru
|
||||
AddCharset KOI8-R .koi8-r
|
||||
AddCharset UCS-2 .ucs2
|
||||
AddCharset UCS-4 .ucs4
|
||||
AddCharset UTF-8 .utf8
|
||||
|
||||
<IfModule mod_negotiation.c>
|
||||
LanguagePriority en ca cs da de el eo es et fr he hr it ja ko ltz nl nn no pl pt pt-BR ru sv zh-CN zh-TW
|
||||
</IfModule>
|
||||
|
||||
AddType application/x-tar .tgz
|
||||
|
||||
AddEncoding x-compress .Z
|
||||
AddEncoding x-gzip .gz .tgz
|
||||
|
||||
AddType application/x-x509-ca-cert .crt
|
||||
AddType application/x-pkcs7-crl .crl
|
||||
|
||||
AddHandler cgi-script .cgi .pl
|
||||
|
||||
AddType text/html .shtml
|
||||
AddOutputFilter INCLUDES .shtml
|
||||
|
||||
AddHandler send-as-is asis
|
||||
|
||||
<IfModule mod_php5.c>
|
||||
AddType application/x-httpd-php .php
|
||||
AddType application/x-httpd-php .bat
|
||||
AddType application/x-httpd-php-source .phps
|
||||
|
||||
<IfModule mod_dir.c>
|
||||
DirectoryIndex index.html index.php
|
||||
</IfModule>
|
||||
|
||||
php_flag log_errors on
|
||||
php_flag short_open_tag on
|
||||
</IfModule>
|
||||
|
||||
<IfModule mod_rewrite.c>
|
||||
RewriteEngine On
|
||||
RewriteCond %{REQUEST_METHOD} ^TRACE
|
||||
RewriteRule .* - [F]
|
||||
</IfModule>
|
||||
|
||||
<VirtualHost *:8443>
|
||||
ServerName 127.0.0.1
|
||||
SSLEngine On
|
||||
</VirtualHost>
|
||||
|
||||
#
|
||||
# Apple-specific filesystem protection.
|
||||
#
|
||||
<Files "rsrc">
|
||||
Require all denied
|
||||
</Files>
|
||||
|
||||
<Directory ~ ".*\.\.namedfork">
|
||||
Require all denied
|
||||
</Directory>
|
||||
@@ -1,602 +0,0 @@
|
||||
# This is a comment. I love comments.
|
||||
|
||||
# This file controls what Internet media types are sent to the client for
|
||||
# given file extension(s). Sending the correct media type to the client
|
||||
# is important so they know how to handle the content of the file.
|
||||
# Extra types can either be added here or by using an AddType directive
|
||||
# in your config files. For more information about Internet media types,
|
||||
# please read RFC 2045, 2046, 2047, 2048, and 2077. The Internet media type
|
||||
# registry is at <http://www.iana.org/assignments/media-types/>.
|
||||
|
||||
# MIME type Extensions
|
||||
application/activemessage
|
||||
application/andrew-inset ez
|
||||
application/applefile
|
||||
application/atom+xml atom
|
||||
application/atomicmail
|
||||
application/batch-smtp
|
||||
application/beep+xml
|
||||
application/cals-1840
|
||||
application/cnrp+xml
|
||||
application/commonground
|
||||
application/cpl+xml
|
||||
application/cybercash
|
||||
application/dca-rft
|
||||
application/dec-dx
|
||||
application/dvcs
|
||||
application/edi-consent
|
||||
application/edifact
|
||||
application/edi-x12
|
||||
application/eshop
|
||||
application/font-tdpfr
|
||||
application/http
|
||||
application/hyperstudio
|
||||
application/iges
|
||||
application/index
|
||||
application/index.cmd
|
||||
application/index.obj
|
||||
application/index.response
|
||||
application/index.vnd
|
||||
application/iotp
|
||||
application/ipp
|
||||
application/isup
|
||||
application/mac-binhex40 hqx
|
||||
application/mac-compactpro cpt
|
||||
application/macwriteii
|
||||
application/marc
|
||||
application/mathematica
|
||||
application/mathml+xml mathml
|
||||
application/msword doc
|
||||
application/news-message-id
|
||||
application/news-transmission
|
||||
application/ocsp-request
|
||||
application/ocsp-response
|
||||
application/octet-stream bin dms lha lzh exe class so dll dmg
|
||||
application/oda oda
|
||||
application/ogg ogg
|
||||
application/parityfec
|
||||
application/pdf pdf
|
||||
application/pgp-encrypted
|
||||
application/pgp-keys
|
||||
application/pgp-signature
|
||||
application/pkcs10
|
||||
application/pkcs7-mime
|
||||
application/pkcs7-signature
|
||||
application/pkix-cert
|
||||
application/pkix-crl
|
||||
application/pkixcmp
|
||||
application/postscript ai eps ps
|
||||
application/prs.alvestrand.titrax-sheet
|
||||
application/prs.cww
|
||||
application/prs.nprend
|
||||
application/prs.plucker
|
||||
application/qsig
|
||||
application/rdf+xml rdf
|
||||
application/reginfo+xml
|
||||
application/remote-printing
|
||||
application/riscos
|
||||
application/rtf
|
||||
application/sdp
|
||||
application/set-payment
|
||||
application/set-payment-initiation
|
||||
application/set-registration
|
||||
application/set-registration-initiation
|
||||
application/sgml
|
||||
application/sgml-open-catalog
|
||||
application/sieve
|
||||
application/slate
|
||||
application/smil smi smil
|
||||
application/srgs gram
|
||||
application/srgs+xml grxml
|
||||
application/timestamp-query
|
||||
application/timestamp-reply
|
||||
application/tve-trigger
|
||||
application/vemmi
|
||||
application/vnd.3gpp.pic-bw-large
|
||||
application/vnd.3gpp.pic-bw-small
|
||||
application/vnd.3gpp.pic-bw-var
|
||||
application/vnd.3gpp.sms
|
||||
application/vnd.3m.post-it-notes
|
||||
application/vnd.accpac.simply.aso
|
||||
application/vnd.accpac.simply.imp
|
||||
application/vnd.acucobol
|
||||
application/vnd.acucorp
|
||||
application/vnd.adobe.xfdf
|
||||
application/vnd.aether.imp
|
||||
application/vnd.amiga.ami
|
||||
application/vnd.anser-web-certificate-issue-initiation
|
||||
application/vnd.anser-web-funds-transfer-initiation
|
||||
application/vnd.audiograph
|
||||
application/vnd.blueice.multipass
|
||||
application/vnd.bmi
|
||||
application/vnd.businessobjects
|
||||
application/vnd.canon-cpdl
|
||||
application/vnd.canon-lips
|
||||
application/vnd.cinderella
|
||||
application/vnd.claymore
|
||||
application/vnd.commerce-battelle
|
||||
application/vnd.commonspace
|
||||
application/vnd.contact.cmsg
|
||||
application/vnd.cosmocaller
|
||||
application/vnd.criticaltools.wbs+xml
|
||||
application/vnd.ctc-posml
|
||||
application/vnd.cups-postscript
|
||||
application/vnd.cups-raster
|
||||
application/vnd.cups-raw
|
||||
application/vnd.curl
|
||||
application/vnd.cybank
|
||||
application/vnd.data-vision.rdz
|
||||
application/vnd.dna
|
||||
application/vnd.dpgraph
|
||||
application/vnd.dreamfactory
|
||||
application/vnd.dxr
|
||||
application/vnd.ecdis-update
|
||||
application/vnd.ecowin.chart
|
||||
application/vnd.ecowin.filerequest
|
||||
application/vnd.ecowin.fileupdate
|
||||
application/vnd.ecowin.series
|
||||
application/vnd.ecowin.seriesrequest
|
||||
application/vnd.ecowin.seriesupdate
|
||||
application/vnd.enliven
|
||||
application/vnd.epson.esf
|
||||
application/vnd.epson.msf
|
||||
application/vnd.epson.quickanime
|
||||
application/vnd.epson.salt
|
||||
application/vnd.epson.ssf
|
||||
application/vnd.ericsson.quickcall
|
||||
application/vnd.eudora.data
|
||||
application/vnd.fdf
|
||||
application/vnd.ffsns
|
||||
application/vnd.fints
|
||||
application/vnd.flographit
|
||||
application/vnd.framemaker
|
||||
application/vnd.fsc.weblaunch
|
||||
application/vnd.fujitsu.oasys
|
||||
application/vnd.fujitsu.oasys2
|
||||
application/vnd.fujitsu.oasys3
|
||||
application/vnd.fujitsu.oasysgp
|
||||
application/vnd.fujitsu.oasysprs
|
||||
application/vnd.fujixerox.ddd
|
||||
application/vnd.fujixerox.docuworks
|
||||
application/vnd.fujixerox.docuworks.binder
|
||||
application/vnd.fut-misnet
|
||||
application/vnd.grafeq
|
||||
application/vnd.groove-account
|
||||
application/vnd.groove-help
|
||||
application/vnd.groove-identity-message
|
||||
application/vnd.groove-injector
|
||||
application/vnd.groove-tool-message
|
||||
application/vnd.groove-tool-template
|
||||
application/vnd.groove-vcard
|
||||
application/vnd.hbci
|
||||
application/vnd.hhe.lesson-player
|
||||
application/vnd.hp-hpgl
|
||||
application/vnd.hp-hpid
|
||||
application/vnd.hp-hps
|
||||
application/vnd.hp-pcl
|
||||
application/vnd.hp-pclxl
|
||||
application/vnd.httphone
|
||||
application/vnd.hzn-3d-crossword
|
||||
application/vnd.ibm.afplinedata
|
||||
application/vnd.ibm.electronic-media
|
||||
application/vnd.ibm.minipay
|
||||
application/vnd.ibm.modcap
|
||||
application/vnd.ibm.rights-management
|
||||
application/vnd.ibm.secure-container
|
||||
application/vnd.informix-visionary
|
||||
application/vnd.intercon.formnet
|
||||
application/vnd.intertrust.digibox
|
||||
application/vnd.intertrust.nncp
|
||||
application/vnd.intu.qbo
|
||||
application/vnd.intu.qfx
|
||||
application/vnd.irepository.package+xml
|
||||
application/vnd.is-xpr
|
||||
application/vnd.japannet-directory-service
|
||||
application/vnd.japannet-jpnstore-wakeup
|
||||
application/vnd.japannet-payment-wakeup
|
||||
application/vnd.japannet-registration
|
||||
application/vnd.japannet-registration-wakeup
|
||||
application/vnd.japannet-setstore-wakeup
|
||||
application/vnd.japannet-verification
|
||||
application/vnd.japannet-verification-wakeup
|
||||
application/vnd.jisp
|
||||
application/vnd.kde.karbon
|
||||
application/vnd.kde.kchart
|
||||
application/vnd.kde.kformula
|
||||
application/vnd.kde.kivio
|
||||
application/vnd.kde.kontour
|
||||
application/vnd.kde.kpresenter
|
||||
application/vnd.kde.kspread
|
||||
application/vnd.kde.kword
|
||||
application/vnd.kenameaapp
|
||||
application/vnd.koan
|
||||
application/vnd.liberty-request+xml
|
||||
application/vnd.llamagraphics.life-balance.desktop
|
||||
application/vnd.llamagraphics.life-balance.exchange+xml
|
||||
application/vnd.lotus-1-2-3
|
||||
application/vnd.lotus-approach
|
||||
application/vnd.lotus-freelance
|
||||
application/vnd.lotus-notes
|
||||
application/vnd.lotus-organizer
|
||||
application/vnd.lotus-screencam
|
||||
application/vnd.lotus-wordpro
|
||||
application/vnd.mcd
|
||||
application/vnd.mediastation.cdkey
|
||||
application/vnd.meridian-slingshot
|
||||
application/vnd.micrografx.flo
|
||||
application/vnd.micrografx.igx
|
||||
application/vnd.mif mif
|
||||
application/vnd.minisoft-hp3000-save
|
||||
application/vnd.mitsubishi.misty-guard.trustweb
|
||||
application/vnd.mobius.daf
|
||||
application/vnd.mobius.dis
|
||||
application/vnd.mobius.mbk
|
||||
application/vnd.mobius.mqy
|
||||
application/vnd.mobius.msl
|
||||
application/vnd.mobius.plc
|
||||
application/vnd.mobius.txf
|
||||
application/vnd.mophun.application
|
||||
application/vnd.mophun.certificate
|
||||
application/vnd.motorola.flexsuite
|
||||
application/vnd.motorola.flexsuite.adsi
|
||||
application/vnd.motorola.flexsuite.fis
|
||||
application/vnd.motorola.flexsuite.gotap
|
||||
application/vnd.motorola.flexsuite.kmr
|
||||
application/vnd.motorola.flexsuite.ttc
|
||||
application/vnd.motorola.flexsuite.wem
|
||||
application/vnd.mozilla.xul+xml xul
|
||||
application/vnd.ms-artgalry
|
||||
application/vnd.ms-asf
|
||||
application/vnd.ms-excel xls
|
||||
application/vnd.ms-lrm
|
||||
application/vnd.ms-powerpoint ppt
|
||||
application/vnd.ms-project
|
||||
application/vnd.ms-tnef
|
||||
application/vnd.ms-works
|
||||
application/vnd.ms-wpl
|
||||
application/vnd.mseq
|
||||
application/vnd.msign
|
||||
application/vnd.music-niff
|
||||
application/vnd.musician
|
||||
application/vnd.netfpx
|
||||
application/vnd.noblenet-directory
|
||||
application/vnd.noblenet-sealer
|
||||
application/vnd.noblenet-web
|
||||
application/vnd.novadigm.edm
|
||||
application/vnd.novadigm.edx
|
||||
application/vnd.novadigm.ext
|
||||
application/vnd.obn
|
||||
application/vnd.osa.netdeploy
|
||||
application/vnd.palm
|
||||
application/vnd.pg.format
|
||||
application/vnd.pg.osasli
|
||||
application/vnd.powerbuilder6
|
||||
application/vnd.powerbuilder6-s
|
||||
application/vnd.powerbuilder7
|
||||
application/vnd.powerbuilder7-s
|
||||
application/vnd.powerbuilder75
|
||||
application/vnd.powerbuilder75-s
|
||||
application/vnd.previewsystems.box
|
||||
application/vnd.publishare-delta-tree
|
||||
application/vnd.pvi.ptid1
|
||||
application/vnd.pwg-multiplexed
|
||||
application/vnd.pwg-xhtml-print+xml
|
||||
application/vnd.quark.quarkxpress
|
||||
application/vnd.rapid
|
||||
application/vnd.rn-realmedia rm
|
||||
application/vnd.s3sms
|
||||
application/vnd.sealed.net
|
||||
application/vnd.seemail
|
||||
application/vnd.shana.informed.formdata
|
||||
application/vnd.shana.informed.formtemplate
|
||||
application/vnd.shana.informed.interchange
|
||||
application/vnd.shana.informed.package
|
||||
application/vnd.smaf
|
||||
application/vnd.sss-cod
|
||||
application/vnd.sss-dtf
|
||||
application/vnd.sss-ntf
|
||||
application/vnd.street-stream
|
||||
application/vnd.svd
|
||||
application/vnd.swiftview-ics
|
||||
application/vnd.triscape.mxs
|
||||
application/vnd.trueapp
|
||||
application/vnd.truedoc
|
||||
application/vnd.ufdl
|
||||
application/vnd.uplanet.alert
|
||||
application/vnd.uplanet.alert-wbxml
|
||||
application/vnd.uplanet.bearer-choice
|
||||
application/vnd.uplanet.bearer-choice-wbxml
|
||||
application/vnd.uplanet.cacheop
|
||||
application/vnd.uplanet.cacheop-wbxml
|
||||
application/vnd.uplanet.channel
|
||||
application/vnd.uplanet.channel-wbxml
|
||||
application/vnd.uplanet.list
|
||||
application/vnd.uplanet.list-wbxml
|
||||
application/vnd.uplanet.listcmd
|
||||
application/vnd.uplanet.listcmd-wbxml
|
||||
application/vnd.uplanet.signal
|
||||
application/vnd.vcx
|
||||
application/vnd.vectorworks
|
||||
application/vnd.vidsoft.vidconference
|
||||
application/vnd.visio
|
||||
application/vnd.visionary
|
||||
application/vnd.vividence.scriptfile
|
||||
application/vnd.vsf
|
||||
application/vnd.wap.sic
|
||||
application/vnd.wap.slc
|
||||
application/vnd.wap.xhtml+xml xhtmlmp
|
||||
application/vnd.wap.wbxml wbxml
|
||||
application/vnd.wap.wmlc wmlc
|
||||
application/vnd.wap.wmlscriptc wmlsc
|
||||
application/vnd.webturbo
|
||||
application/vnd.wrq-hp3000-labelled
|
||||
application/vnd.wt.stf
|
||||
application/vnd.wv.csp+wbxml
|
||||
application/vnd.xara
|
||||
application/vnd.xfdl
|
||||
application/vnd.yamaha.hv-dic
|
||||
application/vnd.yamaha.hv-script
|
||||
application/vnd.yamaha.hv-voice
|
||||
application/vnd.yellowriver-custom-menu
|
||||
application/voicexml+xml vxml
|
||||
application/watcherinfo+xml
|
||||
application/whoispp-query
|
||||
application/whoispp-response
|
||||
application/wita
|
||||
application/wordperfect5.1
|
||||
application/x-bcpio bcpio
|
||||
application/x-cdlink vcd
|
||||
application/x-chess-pgn pgn
|
||||
application/x-compress
|
||||
application/x-cpio cpio
|
||||
application/x-csh csh
|
||||
application/x-director dcr dir dxr
|
||||
application/x-dvi dvi
|
||||
application/x-futuresplash spl
|
||||
application/x-gtar gtar
|
||||
application/x-gzip
|
||||
application/x-hdf hdf
|
||||
application/x-javascript js
|
||||
application/x-java-jnlp-file jnlp
|
||||
application/x-koan skp skd skt skm
|
||||
application/x-latex latex
|
||||
application/x-netcdf nc cdf
|
||||
application/x-sh sh
|
||||
application/x-shar shar
|
||||
application/x-shockwave-flash swf
|
||||
application/x-stuffit sit
|
||||
application/x-sv4cpio sv4cpio
|
||||
application/x-sv4crc sv4crc
|
||||
application/x-tar tar
|
||||
application/x-tcl tcl
|
||||
application/x-tex tex
|
||||
application/x-texinfo texinfo texi
|
||||
application/x-troff t tr roff
|
||||
application/x-troff-man man
|
||||
application/x-troff-me me
|
||||
application/x-troff-ms ms
|
||||
application/x-ustar ustar
|
||||
application/x-wais-source src
|
||||
application/x400-bp
|
||||
application/xhtml+xml xhtml xht
|
||||
application/xslt+xml xslt
|
||||
application/xml xml xsl
|
||||
application/xml-dtd dtd
|
||||
application/xml-external-parsed-entity
|
||||
application/zip zip
|
||||
audio/32kadpcm
|
||||
audio/amr
|
||||
audio/amr-wb
|
||||
audio/basic au snd
|
||||
audio/cn
|
||||
audio/dat12
|
||||
audio/dsr-es201108
|
||||
audio/dvi4
|
||||
audio/evrc
|
||||
audio/evrc0
|
||||
audio/g722
|
||||
audio/g.722.1
|
||||
audio/g723
|
||||
audio/g726-16
|
||||
audio/g726-24
|
||||
audio/g726-32
|
||||
audio/g726-40
|
||||
audio/g728
|
||||
audio/g729
|
||||
audio/g729D
|
||||
audio/g729E
|
||||
audio/gsm
|
||||
audio/gsm-efr
|
||||
audio/l8
|
||||
audio/l16
|
||||
audio/l20
|
||||
audio/l24
|
||||
audio/lpc
|
||||
audio/midi mid midi kar
|
||||
audio/mpa
|
||||
audio/mpa-robust
|
||||
audio/mp4a-latm m4a m4p
|
||||
audio/mpeg mpga mp2 mp3
|
||||
audio/parityfec
|
||||
audio/pcma
|
||||
audio/pcmu
|
||||
audio/prs.sid
|
||||
audio/qcelp
|
||||
audio/red
|
||||
audio/smv
|
||||
audio/smv0
|
||||
audio/telephone-event
|
||||
audio/tone
|
||||
audio/vdvi
|
||||
audio/vnd.3gpp.iufp
|
||||
audio/vnd.cisco.nse
|
||||
audio/vnd.cns.anp1
|
||||
audio/vnd.cns.inf1
|
||||
audio/vnd.digital-winds
|
||||
audio/vnd.everad.plj
|
||||
audio/vnd.lucent.voice
|
||||
audio/vnd.nortel.vbk
|
||||
audio/vnd.nuera.ecelp4800
|
||||
audio/vnd.nuera.ecelp7470
|
||||
audio/vnd.nuera.ecelp9600
|
||||
audio/vnd.octel.sbc
|
||||
audio/vnd.qcelp
|
||||
audio/vnd.rhetorex.32kadpcm
|
||||
audio/vnd.vmx.cvsd
|
||||
audio/x-aiff aif aiff aifc
|
||||
audio/x-alaw-basic
|
||||
audio/x-mpegurl m3u
|
||||
audio/x-pn-realaudio ram ra
|
||||
audio/x-pn-realaudio-plugin
|
||||
audio/x-wav wav
|
||||
chemical/x-pdb pdb
|
||||
chemical/x-xyz xyz
|
||||
image/bmp bmp
|
||||
image/cgm cgm
|
||||
image/g3fax
|
||||
image/gif gif
|
||||
image/ief ief
|
||||
image/jpeg jpeg jpg jpe
|
||||
image/jp2 jp2
|
||||
image/naplps
|
||||
image/pict pict pic pct
|
||||
image/png png
|
||||
image/prs.btif
|
||||
image/prs.pti
|
||||
image/svg+xml svg
|
||||
image/t38
|
||||
image/tiff tiff tif
|
||||
image/tiff-fx
|
||||
image/vnd.cns.inf2
|
||||
image/vnd.djvu djvu djv
|
||||
image/vnd.dwg
|
||||
image/vnd.dxf
|
||||
image/vnd.fastbidsheet
|
||||
image/vnd.fpx
|
||||
image/vnd.fst
|
||||
image/vnd.fujixerox.edmics-mmr
|
||||
image/vnd.fujixerox.edmics-rlc
|
||||
image/vnd.globalgraphics.pgb
|
||||
image/vnd.mix
|
||||
image/vnd.ms-modi
|
||||
image/vnd.net-fpx
|
||||
image/vnd.svf
|
||||
image/vnd.wap.wbmp wbmp
|
||||
image/vnd.xiff
|
||||
image/x-cmu-raster ras
|
||||
image/x-macpaint pntg pnt mac
|
||||
image/x-icon ico
|
||||
image/x-portable-anymap pnm
|
||||
image/x-portable-bitmap pbm
|
||||
image/x-portable-graymap pgm
|
||||
image/x-portable-pixmap ppm
|
||||
image/x-quicktime qtif qti
|
||||
image/x-rgb rgb
|
||||
image/x-xbitmap xbm
|
||||
image/x-xpixmap xpm
|
||||
image/x-xwindowdump xwd
|
||||
message/delivery-status
|
||||
message/disposition-notification
|
||||
message/external-body
|
||||
message/http
|
||||
message/news
|
||||
message/partial
|
||||
message/rfc822
|
||||
message/s-http
|
||||
message/sip
|
||||
message/sipfrag
|
||||
model/iges igs iges
|
||||
model/mesh msh mesh silo
|
||||
model/vnd.dwf
|
||||
model/vnd.flatland.3dml
|
||||
model/vnd.gdl
|
||||
model/vnd.gs-gdl
|
||||
model/vnd.gtw
|
||||
model/vnd.mts
|
||||
model/vnd.parasolid.transmit.binary
|
||||
model/vnd.parasolid.transmit.text
|
||||
model/vnd.vtu
|
||||
model/vrml wrl vrml
|
||||
multipart/alternative
|
||||
multipart/appledouble
|
||||
multipart/byteranges
|
||||
multipart/digest
|
||||
multipart/encrypted
|
||||
multipart/form-data
|
||||
multipart/header-set
|
||||
multipart/mixed
|
||||
multipart/parallel
|
||||
multipart/related
|
||||
multipart/report
|
||||
multipart/signed
|
||||
multipart/voice-message
|
||||
text/cache-manifest manifest
|
||||
text/calendar ics ifb
|
||||
text/css css
|
||||
text/directory
|
||||
text/enriched
|
||||
text/html html htm
|
||||
text/parityfec
|
||||
text/plain asc txt
|
||||
text/prs.lines.tag
|
||||
text/rfc822-headers
|
||||
text/richtext rtx
|
||||
text/rtf rtf
|
||||
text/sgml sgml sgm
|
||||
text/sky sky
|
||||
text/t140
|
||||
text/tab-separated-values tsv
|
||||
text/uri-list
|
||||
text/vnd.abc
|
||||
text/vnd.curl
|
||||
text/vnd.dmclientscript
|
||||
text/vnd.fly
|
||||
text/vnd.fmi.flexstor
|
||||
text/vnd.in3d.3dml
|
||||
text/vnd.in3d.spot
|
||||
text/vnd.iptc.nitf
|
||||
text/vnd.iptc.newsml
|
||||
text/vnd.latex-z
|
||||
text/vnd.motorola.reflex
|
||||
text/vnd.ms-mediapackage
|
||||
text/vnd.net2phone.commcenter.command
|
||||
text/vnd.sun.j2me.app-descriptor
|
||||
text/vnd.wap.si
|
||||
text/vnd.wap.sl
|
||||
text/vnd.wap.wml wml
|
||||
text/vnd.wap.wmlscript wmls
|
||||
text/x-setext etx
|
||||
text/xml
|
||||
text/xml-external-parsed-entity
|
||||
video/bmpeg
|
||||
video/bt656
|
||||
video/celb
|
||||
video/dv
|
||||
video/h261
|
||||
video/h263
|
||||
video/h263-1998
|
||||
video/h263-2000
|
||||
video/jpeg
|
||||
video/mp1s
|
||||
video/mp2p
|
||||
video/mp2t
|
||||
video/mp4 mp4
|
||||
video/mp4v-es
|
||||
video/mpv
|
||||
video/mpeg mpeg mpg mpe
|
||||
video/nv
|
||||
video/parityfec
|
||||
video/pointer
|
||||
video/quicktime qt mov
|
||||
video/smpte292m
|
||||
video/vnd.fvt
|
||||
video/vnd.motorola.video
|
||||
video/vnd.motorola.videop
|
||||
video/vnd.mpegurl mxu m4u
|
||||
video/vnd.nokia.interleaved-multimedia
|
||||
video/vnd.objectvideo
|
||||
video/vnd.vivo
|
||||
video/x-dv dv dif
|
||||
video/x-msvideo avi
|
||||
video/x-sgi-movie movie
|
||||
x-conference/x-cooltalk ice
|
||||
@@ -1,28 +0,0 @@
|
||||
-----BEGIN RSA PRIVATE KEY-----
|
||||
MIICXQIBAAKBgQCmcXbusrr8zQr8snIb0OVQibVfgv7zPjh/5xdcrKOejJzp3epA
|
||||
AF4TITeFR9vzWIwkmkcRoY+IbQNhh7kefGUYD47bvVamJMtq5cGYVs0HngT+KTMa
|
||||
NGH/G44KkFIOaz/b5d/JNKONrlqwxqXS+m6IY4l/E1Ff25ZjND5TaEvI1wIDAQAB
|
||||
AoGBAIcDv4A9h6UOBv2ZGyspNvsv2erSblGOhXJrWO4aNNemJJspIp4sLiPCbDE3
|
||||
a1po17XRWBkbPz1hgL6axDXQnoeo++ebfrvRSed+Fys4+6SvuSrPOv6PmWTBT/Wa
|
||||
GpO+tv48JUNxC/Dy8ROixBXOViuIBEFq3NfVH4HU3+RG20NhAkEA1L3RAhdfPkLI
|
||||
82luSOYE3Eq44lICb/yZi+JEihwSeZTJKdZHwYD8KVCjOtjGrOmyEyvThrcIACQz
|
||||
JLEreVh33wJBAMhJm9pzJJNkIyBgiXA66FAwbhdDzSTPx0OBjoVWoj6u7jzGvIFT
|
||||
Cn1aiTBYzzsiMCaCx+W3e6pK/DcvHSwKrgkCQHZMcxwBmSHLC2lnmD8LQWqqVnLr
|
||||
fZV+VnfVw501DQT0uoP8NvygWBg1Uf9YKepfLXnBpidEQjup5ZKivnUEv+sCQA8N
|
||||
6VcMHI2vkyxV1T7ITrnoSf4ZrIu9yl56mHnRPzSy9VlAHt8hnMI7UeB+bGUndrMO
|
||||
VXQgzHzKUhbbxbePvfECQQDTtkOuhJyKDfHCxLDcwNpi+T6OWTEfCw/cq9ZWDbA7
|
||||
yCX81pQxfZkfMIS1YFIOGHovK0rMMTraCe+iDNYtVz/L
|
||||
-----END RSA PRIVATE KEY-----
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIB9zCCAWACCQDjWWTeC6BQvTANBgkqhkiG9w0BAQQFADBAMQswCQYDVQQGEwJB
|
||||
VTETMBEGA1UECBMKU29tZS1TdGF0ZTEcMBoGA1UEChMTV2ViS2l0IExheW91dCBU
|
||||
ZXN0czAeFw0wNzA3MTMxMjUxMzJaFw03MTA1MTMwNjIzMTZaMEAxCzAJBgNVBAYT
|
||||
AkFVMRMwEQYDVQQIEwpTb21lLVN0YXRlMRwwGgYDVQQKExNXZWJLaXQgTGF5b3V0
|
||||
IFRlc3RzMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCmcXbusrr8zQr8snIb
|
||||
0OVQibVfgv7zPjh/5xdcrKOejJzp3epAAF4TITeFR9vzWIwkmkcRoY+IbQNhh7ke
|
||||
fGUYD47bvVamJMtq5cGYVs0HngT+KTMaNGH/G44KkFIOaz/b5d/JNKONrlqwxqXS
|
||||
+m6IY4l/E1Ff25ZjND5TaEvI1wIDAQABMA0GCSqGSIb3DQEBBAUAA4GBAAfbUbgD
|
||||
01O8DoZA02c1MUMbMHRPSb/qdok2pyWoCPa/BSaOIaNPePc8auPRbrS2XsVWSMft
|
||||
CTXiXmrK2Xx1+fJuZLAp0CUng4De4cDH5c8nvlocYmXo+1x53S9DfD0KPryjBRI7
|
||||
9LnJq2ysHAUawiqFXlwBag6mXawD8YjzcYat
|
||||
-----END CERTIFICATE-----
|
||||
@@ -1,6 +0,0 @@
|
||||
CONSOLE: unittest-suite-wait-for-done
|
||||
CONSOLE: PASS: paragraph width should shrink
|
||||
CONSOLE:
|
||||
CONSOLE: All 1 tests passed.
|
||||
CONSOLE: unittest-suite-success
|
||||
DONE
|
||||
@@ -1,30 +0,0 @@
|
||||
<style>
|
||||
border-box {
|
||||
background-color: pink;
|
||||
box-sizing: border-box;
|
||||
max-width: 300px;
|
||||
padding: 0 5%;
|
||||
}
|
||||
</style>
|
||||
<container style="width: 400px">
|
||||
<border-box>
|
||||
<p>Even though the width of 'border-box' stays the same after it reaches 300px, the width available to its children decreases as its padding continues to expand. Because the padding is based off the width before it's constrained by min/max. This tests that we continue to layout the contents of border-box even when its own width remains the same.</p>
|
||||
</div>
|
||||
</container>
|
||||
|
||||
<script>
|
||||
import "../resources/third_party/unittest/unittest.dart";
|
||||
import "../resources/unit.dart";
|
||||
|
||||
import "dart:sky";
|
||||
|
||||
void main() {
|
||||
initUnit();
|
||||
|
||||
test("paragraph width should shrink", () {
|
||||
expect(document.querySelector("p").offsetWidth, equals(260));
|
||||
document.querySelector("container").style["width"] = "800px";
|
||||
expect(document.querySelector("p").offsetWidth, equals(220));
|
||||
});
|
||||
}
|
||||
</script>
|
||||
@@ -1,7 +0,0 @@
|
||||
CONSOLE: unittest-suite-wait-for-done
|
||||
CONSOLE: PASS: should hit test toolbar
|
||||
CONSOLE: PASS: should hit test toolbar when transformed, but clipped element overlaps
|
||||
CONSOLE:
|
||||
CONSOLE: All 2 tests passed.
|
||||
CONSOLE: unittest-suite-success
|
||||
DONE
|
||||
@@ -1,39 +0,0 @@
|
||||
<style>
|
||||
toolbar {
|
||||
background: yellow;
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
}
|
||||
scrollable {
|
||||
overflow: hidden;
|
||||
height: 400px;
|
||||
background: red;
|
||||
}
|
||||
content {
|
||||
height: 400px;
|
||||
background-color: pink;
|
||||
transform: translateY(-100px);
|
||||
}
|
||||
</style>
|
||||
<toolbar>toolbar</toolbar>
|
||||
<scrollable><content>content</content></scrollable>
|
||||
<script>
|
||||
import "../resources/third_party/unittest/unittest.dart";
|
||||
import "../resources/unit.dart";
|
||||
|
||||
import "dart:async";
|
||||
import "dart:sky";
|
||||
|
||||
void main() {
|
||||
initUnit();
|
||||
|
||||
test("should hit test toolbar", () {
|
||||
expect(document.elementFromPoint(10, 10).textContent, equals("toolbar"));
|
||||
});
|
||||
|
||||
test("should hit test toolbar when transformed, but clipped element overlaps", () {
|
||||
document.querySelector("scrollable").style["transform"] = "translate(0, 0)";
|
||||
expect(document.elementFromPoint(10, 10).textContent, equals("toolbar"));
|
||||
});
|
||||
}
|
||||
</script>
|
||||
@@ -1,4 +0,0 @@
|
||||
layer at (0,0) size 800x600
|
||||
RenderView {#document} at (0,0) size 800x600
|
||||
RenderCustomLayout {block} at (0,0) size 0x0
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
<import src="../resources/dump-as-render-tree.sky" />
|
||||
|
||||
<block>hello</block>
|
||||
|
||||
<script>
|
||||
import 'dart:sky';
|
||||
|
||||
void main() {
|
||||
// This tests custom layout of text nodes inside non-paragraphs.
|
||||
// They shouldn't show up in the render tree at all, so they
|
||||
// don't need laying out.
|
||||
// This test passes if it doesn't crash and the render tree
|
||||
// has no RenderTexts.
|
||||
document.querySelector('block').setLayoutManager(() {}, () {});
|
||||
}
|
||||
</script>
|
||||
@@ -1,7 +0,0 @@
|
||||
CONSOLE: unittest-suite-wait-for-done
|
||||
CONSOLE: PASS: should have the right sizes after layout
|
||||
CONSOLE: PASS: intrinsic sizes should apply
|
||||
CONSOLE:
|
||||
CONSOLE: All 2 tests passed.
|
||||
CONSOLE: unittest-suite-success
|
||||
DONE
|
||||
@@ -1,158 +0,0 @@
|
||||
<root style="width: 300px">
|
||||
<parent style='background-color: lightblue;'>
|
||||
<child style='background-color: pink;'>
|
||||
<grandchild style='background-color: red; width: 25px; height: 25px;'></grandchild>
|
||||
</child>
|
||||
<child2 style='background-color: salmon; height: 25px;' />
|
||||
</parent>
|
||||
</root>
|
||||
|
||||
<intrinsic-container>
|
||||
<intrinsic>
|
||||
<intrinsic-child style="width: 10px; height: 10px; background-color: lightblue;" />
|
||||
</intrinsic>
|
||||
</intrinsic-container>
|
||||
|
||||
<script>
|
||||
import "../resources/third_party/unittest/unittest.dart";
|
||||
import "../resources/unit.dart";
|
||||
|
||||
import 'dart:async';
|
||||
import 'dart:sky';
|
||||
|
||||
void main() {
|
||||
initUnit();
|
||||
|
||||
test("should have the right sizes after layout", () {
|
||||
Completer completer = new Completer();
|
||||
|
||||
var first = true;
|
||||
|
||||
var parent = document.querySelector('parent');
|
||||
var firstChild = parent.firstElementChild;
|
||||
var secondChild = parent.lastElementChild;
|
||||
var grandChild = document.querySelector('grandchild');
|
||||
|
||||
parent.setLayoutManager(() {
|
||||
if (first) {
|
||||
parent.width = 200.0;
|
||||
} else {
|
||||
parent.width = 150.0;
|
||||
}
|
||||
|
||||
firstChild.width = 100.0;
|
||||
firstChild.layout();
|
||||
firstChild.x = 100.0;
|
||||
firstChild.y = 50.0;
|
||||
firstChild.height = 50.0;
|
||||
|
||||
// The second element correctly gets it's width from it's container.
|
||||
// TODO(ojan): Change the layout method to take in availableWidth
|
||||
// so code doesn't need to mess with setNeedsLayout dirty bits
|
||||
// in the middle of layout and so the parent and child don't need
|
||||
// to coordinate as much about expectations.
|
||||
secondChild.setNeedsLayout();
|
||||
secondChild.layout();
|
||||
|
||||
parent.height = 100.0;
|
||||
}, () {});
|
||||
|
||||
void assertNonChangingValues() {
|
||||
expect(parent.offsetHeight, equals(100));
|
||||
expect(parent.offsetTop, equals(0));
|
||||
expect(parent.offsetLeft, equals(0));
|
||||
|
||||
expect(firstChild.offsetWidth, equals(100));
|
||||
expect(firstChild.offsetHeight, equals(50));
|
||||
expect(firstChild.offsetTop, equals(50));
|
||||
expect(firstChild.offsetLeft, equals(100));
|
||||
|
||||
expect(secondChild.offsetHeight, equals(25));
|
||||
expect(secondChild.offsetTop, equals(0));
|
||||
expect(secondChild.offsetLeft, equals(0));
|
||||
|
||||
expect(grandChild.offsetWidth, equals(25));
|
||||
expect(grandChild.offsetHeight, equals(25));
|
||||
expect(secondChild.offsetTop, equals(0));
|
||||
expect(secondChild.offsetLeft, equals(0));
|
||||
};
|
||||
|
||||
window.requestAnimationFrame((_) {
|
||||
expect(parent.offsetWidth, equals(200));
|
||||
expect(secondChild.offsetWidth, equals(200));
|
||||
assertNonChangingValues();
|
||||
|
||||
first = false;
|
||||
parent.setNeedsLayout();
|
||||
|
||||
window.requestAnimationFrame((_) {
|
||||
expect(parent.offsetWidth, equals(150));
|
||||
expect(secondChild.offsetWidth, equals(150));
|
||||
assertNonChangingValues();
|
||||
|
||||
parent.setLayoutManager(() {
|
||||
parent.width = 250.0;
|
||||
}, () {});
|
||||
|
||||
window.requestAnimationFrame((_) {
|
||||
expect(parent.offsetWidth, equals(250));
|
||||
assertNonChangingValues();
|
||||
|
||||
parent.setLayoutManager(null, null);
|
||||
|
||||
window.requestAnimationFrame((_) {
|
||||
expect(parent.offsetWidth, equals(300));
|
||||
expect(parent.offsetHeight, equals(50));
|
||||
expect(parent.offsetTop, equals(0));
|
||||
expect(parent.offsetLeft, equals(0));
|
||||
|
||||
expect(firstChild.offsetWidth, equals(300));
|
||||
expect(firstChild.offsetHeight, equals(25));
|
||||
expect(firstChild.offsetTop, equals(0));
|
||||
expect(firstChild.offsetLeft, equals(0));
|
||||
|
||||
expect(secondChild.offsetWidth, equals(300));
|
||||
expect(secondChild.offsetHeight, equals(25));
|
||||
expect(secondChild.offsetTop, equals(25));
|
||||
expect(secondChild.offsetLeft, equals(0));
|
||||
|
||||
expect(grandChild.offsetWidth, equals(25));
|
||||
expect(grandChild.offsetHeight, equals(25));
|
||||
expect(grandChild.offsetTop, equals(0));
|
||||
expect(grandChild.offsetLeft, equals(0));
|
||||
|
||||
completer.complete();
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
return completer.future;
|
||||
});
|
||||
|
||||
test("intrinsic sizes should apply", () {
|
||||
Completer completer = new Completer();
|
||||
|
||||
var intrinsic = document.querySelector('intrinsic');
|
||||
var intrinsicChild = document.querySelector('intrinsic-child');
|
||||
|
||||
intrinsic.setLayoutManager(() {
|
||||
intrinsicChild.layout();
|
||||
}, () {
|
||||
intrinsic.minContentWidth = intrinsicChild.minContentWidth + 5;
|
||||
intrinsic.maxContentWidth = intrinsicChild.maxContentWidth + 7;
|
||||
});
|
||||
|
||||
window.requestAnimationFrame((_) {
|
||||
var container = document.querySelector('intrinsic-container');
|
||||
container.style['width'] = '-webkit-min-content';
|
||||
expect(container.offsetWidth, equals(15));
|
||||
container.style['width'] = '-webkit-max-content';
|
||||
expect(container.offsetWidth, equals(17));
|
||||
completer.complete();
|
||||
});
|
||||
|
||||
return completer.future;
|
||||
});
|
||||
}
|
||||
</script>
|
||||
@@ -1,12 +0,0 @@
|
||||
CONSOLE: unittest-suite-wait-for-done
|
||||
CONSOLE: PASS: should hit test top item
|
||||
CONSOLE: PASS: should hit test second
|
||||
CONSOLE: PASS: should hit test third
|
||||
CONSOLE: PASS: should hit test fourth
|
||||
CONSOLE: PASS: should hit test fifth
|
||||
CONSOLE: PASS: should hit test sixth
|
||||
CONSOLE: PASS: should hit test seventh
|
||||
CONSOLE:
|
||||
CONSOLE: All 7 tests passed.
|
||||
CONSOLE: unittest-suite-success
|
||||
DONE
|
||||
@@ -1,92 +0,0 @@
|
||||
<style>
|
||||
postive-z-above,
|
||||
postive-z-below,
|
||||
zero-z-above,
|
||||
zero-z-below,
|
||||
no-z-above,
|
||||
no-z-below,
|
||||
postive-z-after {
|
||||
position: absolute;
|
||||
display: flex;
|
||||
left: 0;
|
||||
right: 0;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
background-color: blue;
|
||||
}
|
||||
|
||||
no-z-below {
|
||||
top: 50px;
|
||||
background-color: green;
|
||||
}
|
||||
zero-z-above {
|
||||
z-index: 0;
|
||||
top: 100px;
|
||||
background-color: red;
|
||||
}
|
||||
zero-z-below {
|
||||
z-index: 0;
|
||||
top: 150px;
|
||||
background-color: salmon;
|
||||
}
|
||||
postive-z-above {
|
||||
z-index: 1;
|
||||
top: 200px;
|
||||
background-color: yellow;
|
||||
}
|
||||
postive-z-below {
|
||||
z-index: 1;
|
||||
top: 250px;
|
||||
background-color: pink;
|
||||
}
|
||||
postive-z-after {
|
||||
z-index: 1;
|
||||
top: 300px;
|
||||
background-color: orange;
|
||||
}
|
||||
</style>
|
||||
<postive-z-above layer yellow></postive-z-above>
|
||||
<postive-z-below layer pink></postive-z-below>
|
||||
<no-z-above no-layer blue></no-z-above>
|
||||
<no-z-below no-layer green></no-z-below>
|
||||
<zero-z-above layer red></zero-z-above>
|
||||
<zero-z-below layer salmon></zero-z-below>
|
||||
<postive-z-after layer orange></postive-z-after>
|
||||
<script>
|
||||
import "../resources/third_party/unittest/unittest.dart";
|
||||
import "../resources/unit.dart";
|
||||
|
||||
import "dart:sky";
|
||||
|
||||
void main() {
|
||||
initUnit();
|
||||
|
||||
test("should hit test top item", () {
|
||||
expect(document.elementFromPoint(100, 25).tagName, equals('no-z-above'));
|
||||
});
|
||||
|
||||
test("should hit test second", () {
|
||||
expect(document.elementFromPoint(100, 75).tagName, equals('no-z-below'));
|
||||
});
|
||||
|
||||
test("should hit test third", () {
|
||||
expect(document.elementFromPoint(100, 125).tagName, equals('zero-z-above'));
|
||||
});
|
||||
|
||||
test("should hit test fourth", () {
|
||||
expect(document.elementFromPoint(100, 175).tagName, equals('zero-z-below'));
|
||||
});
|
||||
|
||||
test("should hit test fifth", () {
|
||||
expect(document.elementFromPoint(100, 225).tagName, equals('postive-z-above'));
|
||||
});
|
||||
|
||||
test("should hit test sixth", () {
|
||||
expect(document.elementFromPoint(100, 275).tagName, equals('postive-z-below'));
|
||||
});
|
||||
|
||||
test("should hit test seventh", () {
|
||||
expect(document.elementFromPoint(100, 325).tagName, equals('postive-z-after'));
|
||||
});
|
||||
}
|
||||
</script>
|
||||
@@ -1,10 +0,0 @@
|
||||
CONSOLE: unittest-suite-wait-for-done
|
||||
CONSOLE: PASS: should hit test
|
||||
CONSOLE: PASS: should hit test child and parent
|
||||
CONSOLE: PASS: should hit test child with layered parent
|
||||
CONSOLE: PASS: should hit test transformed child
|
||||
CONSOLE: PASS: should hit test canvas
|
||||
CONSOLE:
|
||||
CONSOLE: All 5 tests passed.
|
||||
CONSOLE: unittest-suite-success
|
||||
DONE
|
||||
@@ -1,75 +0,0 @@
|
||||
<sky>
|
||||
<style>
|
||||
foo, parent { width: 100px; height: 100px; background: blue; }
|
||||
bar { width: 100px; height: 100px; background: purple; }
|
||||
parent { display: paragraph; }
|
||||
child { background: salmon; display: paragraph; }
|
||||
canvas { height: 50px; background-color: pink; }
|
||||
inline-flex { display: inline-flex; width: 50px; height: 50px; background: green; }
|
||||
grand-child { width: 50px; height: 50px; transform: translate3d(100px, 0, 0); background: papayawhip; }
|
||||
</style>
|
||||
<foo /><bar />
|
||||
<parent>
|
||||
<child>Foo bar</child>
|
||||
<inline-flex>
|
||||
<grand-child />
|
||||
</inline-flex>
|
||||
</parent>
|
||||
<canvas />
|
||||
<script>
|
||||
import "../resources/third_party/unittest/unittest.dart";
|
||||
import "../resources/unit.dart";
|
||||
|
||||
import "dart:sky";
|
||||
|
||||
void main() {
|
||||
initUnit();
|
||||
|
||||
test("should hit test", () {
|
||||
// FIXME: We should have much better hit-testing coverage, at least:
|
||||
// inline content (both sections of a wrapped run)
|
||||
// text node
|
||||
// flex box
|
||||
// display: paragraph
|
||||
// position: absolute
|
||||
// position: relative
|
||||
// z-order (missing, zero, positive and negative)
|
||||
expect(document.elementFromPoint(50, 50).tagName, equals('foo'));
|
||||
expect(document.elementFromPoint(50, 150).tagName, equals('bar'));
|
||||
expect(document.elementFromPoint(150, 50).tagName, equals('sky'));
|
||||
});
|
||||
|
||||
void hitTestWithChildren() {
|
||||
expect(document.elementFromPoint(50, 210).tagName, equals('child'));
|
||||
// Right of the <child> inline.
|
||||
expect(document.elementFromPoint(95, 210).tagName, equals('parent'));
|
||||
// Below the <child> inline.
|
||||
expect(document.elementFromPoint(50, 275).tagName, equals('parent'));
|
||||
}
|
||||
|
||||
test("should hit test child and parent", () {
|
||||
hitTestWithChildren();
|
||||
});
|
||||
|
||||
test("should hit test child with layered parent", () {
|
||||
document.querySelector('parent').style["transform"] = "translate3d(0, 0, 0)";
|
||||
hitTestWithChildren();
|
||||
});
|
||||
|
||||
test("should hit test transformed child", () {
|
||||
document.querySelector('parent').style["display"] = "flex";
|
||||
document.querySelector('child').style["transform"] = "translate3d(100px, 0, 0)";
|
||||
expect(document.elementFromPoint(50, 210).tagName, equals('parent'));
|
||||
expect(document.elementFromPoint(150, 210).tagName, equals('child'));
|
||||
expect(document.elementFromPoint(25, 240).tagName, equals('inline-flex'));
|
||||
// TODO(ojan): This is incorrect. It should hit grand-child.
|
||||
// This broke sometime before 4153b8a515d54275934d4244aaf2d5a7a8fe3333.
|
||||
expect(document.elementFromPoint(150, 240).tagName, equals('sky'));
|
||||
});
|
||||
|
||||
test("should hit test canvas", () {
|
||||
expect(document.elementFromPoint(50, 310).tagName, equals('canvas'));
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</sky>
|
||||
@@ -1,18 +0,0 @@
|
||||
layer at (0,0) size 800x600
|
||||
RenderView {#document} at (0,0) size 800x600
|
||||
RenderFlexibleBox {sky} at (0,0) size 800x50
|
||||
layer at (0,0) size 56x25
|
||||
RenderParagraph {p} at (0,0) size 56x25 [border: (3px solid #FF0000)]
|
||||
RenderText {#text} at (3,3) size 96x19
|
||||
text run at (3,3) width 96: "These lines "
|
||||
RenderInline {p} at (0,0) size 54x19 [border: (3px solid #FF0000)]
|
||||
RenderText {#text} at (98,3) size 54x19
|
||||
text run at (98,3) width 54: "should"
|
||||
RenderText {#text} at (151,3) size 99x19
|
||||
text run at (151,3) width 99: " all ellipsize."
|
||||
layer at (0,25) size 56x25
|
||||
RenderParagraph {p} at (0,25) size 56x25 [border: (3px solid #FF0000)]
|
||||
RenderInline {span} at (0,0) size 117x19
|
||||
RenderText {#text} at (3,3) size 117x19
|
||||
text run at (3,3) width 117: "As should this."
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
<sky>
|
||||
<import src="../resources/dump-as-render-tree.sky" />
|
||||
<style>
|
||||
p {
|
||||
width: 50px;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
border: 3px solid red;
|
||||
}
|
||||
span {
|
||||
display: inline;
|
||||
}
|
||||
</style>
|
||||
<p>These lines <p>should</p> all ellipsize. </p>
|
||||
<p><span>As should this.</span></p>
|
||||
</sky>
|
||||
@@ -1,5 +0,0 @@
|
||||
layer at (0,0) size 800x600
|
||||
RenderView {#document} at (0,0) size 800x600
|
||||
RenderFlexibleBox {sky} at (0,0) size 800x50
|
||||
RenderFlexibleBox {div} at (0,0) size 50x50 [bgcolor=#FFC0CB]
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
<sky>
|
||||
<import src="../resources/dump-as-render-tree.sky" />
|
||||
<div style="width: 50px; height: 50px; background-color: pink;"></div>
|
||||
</sky>
|
||||
@@ -1 +0,0 @@
|
||||
PASS
|
||||
@@ -1,21 +0,0 @@
|
||||
<sky>
|
||||
<import src="../resources/check-layout.sky" as="checkLayout" />
|
||||
<style>
|
||||
.root {
|
||||
margin: 5px;
|
||||
}
|
||||
.child {
|
||||
margin: 10px;
|
||||
height: 30px;
|
||||
position: absolute;
|
||||
}
|
||||
</style>
|
||||
<div class="root" data-expected-height="0" data-total-y="5" style="background-color: pink">
|
||||
<div class="child" data-total-y="15" style="background-color: salmon"></div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
checkLayout('.root');
|
||||
</script>
|
||||
</sky>
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
FAIL:
|
||||
<div class="child" data-total-y="15" style="background-color: salmon">
|
||||
Expected 15 for clientTop+offsetTop, but got 10, clientTop: 0, + offsetTop: 10.
|
||||
<div class="child" data-total-y="65" style="background-color: papayawhip">
|
||||
Expected 65 for clientTop+offsetTop, but got 60, clientTop: 0, + offsetTop: 60.
|
||||
@@ -1,23 +0,0 @@
|
||||
<sky>
|
||||
<import src="../resources/check-layout.sky" as="checkLayout" />
|
||||
<style>
|
||||
.root {
|
||||
margin: 5px;
|
||||
}
|
||||
.child {
|
||||
margin: 10px;
|
||||
height: 30px;
|
||||
}
|
||||
</style>
|
||||
<div class="root" data-expected-height="100" data-total-y="5" style="background-color: pink">
|
||||
<!-- TODO(ojan): These numbers are right, but the test fails because we appear to have
|
||||
broken offsetTop to not include the parent's margin-top. -->
|
||||
<div class="child" data-total-y="15" style="background-color: salmon"></div>
|
||||
<div class="child" data-total-y="65" style="background-color: papayawhip"></div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
checkLayout('.root');
|
||||
</script>
|
||||
</sky>
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
layer at (0,0) size 800x600
|
||||
RenderView {#document} at (0,0) size 800x600
|
||||
layer at (0,0) size 100x100
|
||||
RenderFlexibleBox {block} at (0,0) size 100x100 [bgcolor=#FFC0CB]
|
||||
RenderFlexibleBox {spacer} at (0,0) size 40x40 [bgcolor=#FFEFD5] [border: (5px solid #800080)]
|
||||
RenderFlexibleBox {spacer} at (0,40) size 40x40 [bgcolor=#FFEFD5] [border: (5px solid #800080)]
|
||||
layer at (0,0) size 20x20
|
||||
RenderFlexibleBox {absolute} at (0,0) size 20x20 [bgcolor=#008000]
|
||||
layer at (0,150) size 100x100
|
||||
RenderParagraph {p} at (0,150) size 100x100 [bgcolor=#FFA500]
|
||||
RenderFlexibleBox {spacer} at (0,0) size 40x40 [bgcolor=#FFEFD5] [border: (5px solid #800080)]
|
||||
RenderFlexibleBox {spacer} at (40,0) size 40x40 [bgcolor=#FFEFD5] [border: (5px solid #800080)]
|
||||
layer at (0,150) size 20x20
|
||||
RenderFlexibleBox {absolute} at (0,0) size 20x20 [bgcolor=#008000]
|
||||
layer at (0,300) size 100x100
|
||||
RenderFlexibleBox {flex} at (0,300) size 100x100 [bgcolor=#FA8072]
|
||||
RenderFlexibleBox {spacer} at (0,0) size 40x40 [bgcolor=#FFEFD5] [border: (5px solid #800080)]
|
||||
RenderFlexibleBox {spacer} at (40,0) size 40x40 [bgcolor=#FFEFD5] [border: (5px solid #800080)]
|
||||
layer at (0,300) size 20x20
|
||||
RenderFlexibleBox {absolute} at (0,0) size 20x20 [bgcolor=#008000]
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
<sky>
|
||||
<import src="../resources/run-after-display.sky"/>
|
||||
|
||||
<img src="http://storage.googleapis.com/mojo/sky-pngs/0e49314437b063e76c28511c34a6c6da72c17956" />
|
||||
|
||||
<script>
|
||||
import "dart:sky";
|
||||
import "dart:sky.internals" as internals;
|
||||
|
||||
void main() {
|
||||
window.addEventListener("load", (_) {
|
||||
runAfterDisplay(() {
|
||||
internals.notifyTestComplete("");
|
||||
});
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</sky>
|
||||
@@ -1,62 +0,0 @@
|
||||
<import src="../resources/run-after-display.sky" />
|
||||
|
||||
<style>
|
||||
block, p, flex {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
margin-bottom: 50px;
|
||||
/* Make it a positioning root. */
|
||||
transform: translate3d(0, 0, 0);
|
||||
}
|
||||
block { background: pink; }
|
||||
p {
|
||||
background: orange;
|
||||
}
|
||||
flex {
|
||||
background: salmon;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
}
|
||||
spacer {
|
||||
height: 30px;
|
||||
width: 30px;
|
||||
border: 5px solid purple;
|
||||
background: papayawhip;
|
||||
}
|
||||
absolute {
|
||||
position: absolute;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
background: green;
|
||||
}
|
||||
</style>
|
||||
<block>
|
||||
<spacer />
|
||||
<absolute />
|
||||
<spacer />
|
||||
</block>
|
||||
|
||||
<p>
|
||||
<spacer />
|
||||
<absolute />
|
||||
<spacer />
|
||||
</p>
|
||||
|
||||
<flex>
|
||||
<spacer />
|
||||
<absolute />
|
||||
<spacer />
|
||||
</flex>
|
||||
|
||||
<script>
|
||||
import "dart:sky";
|
||||
import "dart:sky.internals" as internals;
|
||||
|
||||
void main() {
|
||||
window.addEventListener("load", (_) {
|
||||
runAfterDisplay(() {
|
||||
internals.notifyTestComplete("");
|
||||
});
|
||||
});
|
||||
}
|
||||
</script>
|
||||
@@ -1,49 +0,0 @@
|
||||
<import src="../resources/dump-as-render-tree.sky" />
|
||||
|
||||
<style>
|
||||
block, p, flex {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
margin-bottom: 50px;
|
||||
/* Make it a positioning root. */
|
||||
transform: translate3d(0, 0, 0);
|
||||
}
|
||||
block { background: pink; }
|
||||
p {
|
||||
background: orange;
|
||||
}
|
||||
flex {
|
||||
background: salmon;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
}
|
||||
spacer {
|
||||
height: 30px;
|
||||
width: 30px;
|
||||
border: 5px solid purple;
|
||||
background: papayawhip;
|
||||
}
|
||||
absolute {
|
||||
position: absolute;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
background: green;
|
||||
}
|
||||
</style>
|
||||
<block>
|
||||
<spacer />
|
||||
<absolute />
|
||||
<spacer />
|
||||
</block>
|
||||
|
||||
<p>
|
||||
<spacer />
|
||||
<absolute />
|
||||
<spacer />
|
||||
</p>
|
||||
|
||||
<flex>
|
||||
<spacer />
|
||||
<absolute />
|
||||
<spacer />
|
||||
</flex>
|
||||
@@ -1,44 +0,0 @@
|
||||
layer at (0,0) size 800x600
|
||||
RenderView {#document} at (0,0) size 800x600
|
||||
layer at (0,0) size 800x600
|
||||
RenderFlexibleBox {html} at (0,0) size 800x600
|
||||
RenderFlexibleBox {head} at (0,0) size 800x0
|
||||
RenderFlexibleBox {body} at (0,0) size 800x600 [bgcolor=#FFFFFF]
|
||||
RenderFlexibleBox {div} at (0,0) size 800x265
|
||||
RenderFlexibleBox {div} at (0,0) size 800x115
|
||||
RenderParagraph {div} at (15,15) size 770x49
|
||||
RenderInline {a} at (0,0) size 242x48 [color=#333333]
|
||||
RenderText {#text} at (528,0) size 242x48
|
||||
text run at (528,0) width 242: "Adam Barth"
|
||||
RenderFlexibleBox {div} at (15,64) size 770x36
|
||||
RenderParagraph {div} at (0,0) size 770x18
|
||||
RenderText {#text} at (574,0) size 196x17
|
||||
text run at (574,0) width 196: "Ph.D., M.S., Stanford, 2008"
|
||||
RenderParagraph {div} at (0,18) size 770x18
|
||||
RenderText {#text} at (635,0) size 135x17
|
||||
text run at (635,0) width 135: "B.A., Cornell, 2003"
|
||||
RenderFlexibleBox {div} at (0,115) size 800x150
|
||||
RenderParagraph {div} at (0,19) size 800x28
|
||||
RenderInline {a} at (0,0) size 93x17 [color=#333333]
|
||||
RenderText {#text} at (692,5) size 93x17
|
||||
text run at (692,5) width 93: "@adambarth"
|
||||
RenderParagraph {div} at (0,47) size 800x28
|
||||
RenderInline {a} at (0,0) size 35x17 [color=#333333]
|
||||
RenderText {#text} at (750,5) size 35x17
|
||||
text run at (750,5) width 35: "Blink"
|
||||
RenderParagraph {div} at (0,75) size 800x28
|
||||
RenderInline {a} at (0,0) size 74x17 [color=#333333]
|
||||
RenderText {#text} at (711,5) size 74x17
|
||||
text run at (711,5) width 74: "Chromium"
|
||||
RenderParagraph {div} at (0,103) size 800x28
|
||||
RenderInline {a} at (0,0) size 87x17 [color=#333333]
|
||||
RenderText {#text} at (698,5) size 87x17
|
||||
text run at (698,5) width 87: "Publications"
|
||||
layer at (686,582) size 114x18
|
||||
RenderParagraph {div} at (686.19,582) size 113.81x18 [color=#333333]
|
||||
RenderText {#text} at (3,3) size 73x12
|
||||
text run at (3,3) width 73: "Photograph by "
|
||||
RenderInline {a} at (0,0) size 36x12
|
||||
RenderText {#text} at (75,3) size 36x12
|
||||
text run at (75,3) width 36: "J\x{E9}r\x{F4}me"
|
||||
|
||||
@@ -1,86 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<import src="../resources/dump-as-render-tree.sky" />
|
||||
<title>Adam Barth</title>
|
||||
<style>
|
||||
html {
|
||||
overflow: hidden;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
body {
|
||||
height: 100%;
|
||||
background-color: white;
|
||||
margin: 0;
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center top;
|
||||
background-size: cover;
|
||||
}
|
||||
|
||||
.line,
|
||||
.link,
|
||||
.name,
|
||||
.photograph-credit {
|
||||
display: paragraph;
|
||||
}
|
||||
|
||||
.photograph-credit {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
padding: 3px;
|
||||
font-size: 8pt;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.name a {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.bio {
|
||||
padding: 15px;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.name {
|
||||
font-weight: bold;
|
||||
font-size: 32pt;
|
||||
}
|
||||
|
||||
.links {
|
||||
padding: 19px 0;
|
||||
}
|
||||
|
||||
.link {
|
||||
padding: 5px 15px;
|
||||
text-align: right;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="card">
|
||||
<div class="bio">
|
||||
<div class="name"><a href="./">Adam Barth</a></div>
|
||||
<div class="education">
|
||||
<div class="line">Ph.D., M.S., Stanford, 2008</div>
|
||||
<div class="line">B.A., Cornell, 2003</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="links">
|
||||
<div class="link"><a href="http://twitter.com/adambarth">@adambarth</a></div>
|
||||
<div class="link"><a href="http://dev.chromium.org/blink">Blink</a></div>
|
||||
<div class="link"><a href="http://blog.chromium.org/">Chromium</a></div>
|
||||
<div class="link"><a href="papers/">Publications</a></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="photograph-credit">
|
||||
Photograph by <a href="http://www.flickr.com/photos/lesphotosdejerome/">Jérôme</a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,7 +0,0 @@
|
||||
CONSOLE: unittest-suite-wait-for-done
|
||||
CONSOLE: PASS: should grow width to 200px
|
||||
CONSOLE: PASS: should grow height to 200px
|
||||
CONSOLE:
|
||||
CONSOLE: All 2 tests passed.
|
||||
CONSOLE: unittest-suite-success
|
||||
DONE
|
||||
@@ -1,35 +0,0 @@
|
||||
<sky>
|
||||
<style>
|
||||
div { width: 100px; height: 100px; background-color: red; }
|
||||
div.wide { width: 200px; }
|
||||
div#high { height: 200px; }
|
||||
</style>
|
||||
<div></div>
|
||||
<div></div>
|
||||
<script>
|
||||
import "../resources/third_party/unittest/unittest.dart";
|
||||
import "../resources/unit.dart";
|
||||
|
||||
import "dart:sky";
|
||||
|
||||
void main() {
|
||||
initUnit();
|
||||
|
||||
test("should grow width to 200px", () {
|
||||
var target = document.querySelector('div');
|
||||
|
||||
target.classList.add("wide");
|
||||
expect(window.getComputedStyle(target)["width"],
|
||||
equals("200px"));
|
||||
});
|
||||
|
||||
test("should grow height to 200px", () {
|
||||
var target = document.querySelectorAll('div')[1];
|
||||
|
||||
target.setAttribute("id", "high");
|
||||
expect(window.getComputedStyle(target)["height"],
|
||||
equals("200px"));
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</sky>
|
||||
@@ -1,6 +0,0 @@
|
||||
CONSOLE: unittest-suite-wait-for-done
|
||||
CONSOLE: PASS: should have various casing
|
||||
CONSOLE:
|
||||
CONSOLE: All 1 tests passed.
|
||||
CONSOLE: unittest-suite-success
|
||||
DONE
|
||||
@@ -1,19 +0,0 @@
|
||||
<CamelCase>
|
||||
<script>
|
||||
import "../resources/third_party/unittest/unittest.dart";
|
||||
import "../resources/unit.dart";
|
||||
|
||||
import "dart:sky";
|
||||
|
||||
void main () {
|
||||
initUnit();
|
||||
|
||||
test('should have various casing', () {
|
||||
expect(document.firstElementChild.tagName, equals('CamelCase'));
|
||||
|
||||
var element = document.createElement('CamelCase');
|
||||
expect(element.tagName, equals('CamelCase'));
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</CamelCase>
|
||||
@@ -1,12 +0,0 @@
|
||||
CONSOLE: unittest-suite-wait-for-done
|
||||
CONSOLE: PASS: should add classes in order
|
||||
CONSOLE: PASS: should remove classes
|
||||
CONSOLE: PASS: should clear all classes
|
||||
CONSOLE: PASS: should check for classes
|
||||
CONSOLE: PASS: should get classes by index
|
||||
CONSOLE: PASS: should toggle classes
|
||||
CONSOLE: PASS: should dynamically update style
|
||||
CONSOLE:
|
||||
CONSOLE: All 7 tests passed.
|
||||
CONSOLE: unittest-suite-success
|
||||
DONE
|
||||
@@ -1,126 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<sky>
|
||||
<style>
|
||||
div { font-size: 5px; }
|
||||
.font-10 { font-size: 10px; }
|
||||
.font-12 { font-size: 12px; }
|
||||
.font-24 { font-size: 24px; }
|
||||
</style>
|
||||
<div id="sandbox"></div>
|
||||
<script>
|
||||
import "../resources/third_party/unittest/unittest.dart";
|
||||
import "../resources/unit.dart";
|
||||
|
||||
import "dart:sky";
|
||||
|
||||
main() {
|
||||
initUnit();
|
||||
|
||||
var sandbox = document.getElementById("sandbox");
|
||||
var target = null;
|
||||
|
||||
setUp(() {
|
||||
target = document.createElement("div");
|
||||
sandbox.appendChild(target);
|
||||
});
|
||||
|
||||
tearDown(() {
|
||||
target.remove();
|
||||
});
|
||||
|
||||
// test("should add multiple classes", () {
|
||||
// target.classList..add("first", "second", "third");
|
||||
// expect(target.classList.toString(), equals("first second third"));
|
||||
// });
|
||||
|
||||
test("should add classes in order", () {
|
||||
target.classList..add("first")
|
||||
..add("second");
|
||||
expect(target.classList.toString(), equals("first second"));
|
||||
});
|
||||
|
||||
test("should remove classes", () {
|
||||
target.classList..add("first")
|
||||
..add("second")
|
||||
..add("third")
|
||||
..remove("second");
|
||||
expect(target.classList.toString(), equals("first third"));
|
||||
});
|
||||
|
||||
// test("should remove multiple classes", () {
|
||||
// target.classList.add("first", "second", "third");
|
||||
// target.classList.remove("first", "third");
|
||||
// expect(target.classList.toString(), equals("second"));
|
||||
// });
|
||||
|
||||
test("should clear all classes", () {
|
||||
target.classList.add("first");
|
||||
target.classList.add("second");
|
||||
target.classList.clear();
|
||||
expect(target.classList.toString(), equals(""));
|
||||
expect(target.hasAttribute("class"), isFalse);
|
||||
});
|
||||
|
||||
test("should check for classes", () {
|
||||
target.classList..add("first")
|
||||
..add("second")
|
||||
..add("third");
|
||||
expect(target.classList.contains("first"), isTrue);
|
||||
expect(target.classList.contains("second"), isTrue);
|
||||
expect(target.classList.contains("third"), isTrue);
|
||||
target.classList.remove("second");
|
||||
expect(target.classList.contains("first"), isTrue);
|
||||
expect(target.classList.contains("second"), isFalse);
|
||||
expect(target.classList.contains("third"), isTrue);
|
||||
});
|
||||
|
||||
test("should get classes by index", () {
|
||||
target.classList..add("first")
|
||||
..add("second")
|
||||
..add("third");
|
||||
// expect(target.classList[0], equals("first"));
|
||||
// expect(target.classList[1], equals("second"));
|
||||
// expect(target.classList[2], equals("third"));
|
||||
expect(target.classList.item(0), equals("first"));
|
||||
expect(target.classList.item(1), equals("second"));
|
||||
expect(target.classList.item(2), equals("third"));
|
||||
});
|
||||
|
||||
test("should toggle classes", () {
|
||||
target.classList..add("first")
|
||||
..add("second");
|
||||
expect(target.classList.toggle("first"), isFalse);
|
||||
expect(target.classList.toString(), equals("second"));
|
||||
expect(target.classList.toggle("first"), isTrue);
|
||||
expect(target.classList.toString(), equals("second first"));
|
||||
// expect(target.classList.toggle("second", true), isTrue);
|
||||
// expect(target.classList.toString(), equals("second first"));
|
||||
// expect(target.classList.toggle("second", true), isTrue);
|
||||
// expect(target.classList.toggle("second", false), isFalse);
|
||||
// expect(target.classList.toggle("second", false), isFalse);
|
||||
// expect(target.classList.toString(), equals("first"));
|
||||
});
|
||||
|
||||
test("should dynamically update style", () {
|
||||
expect(window.getComputedStyle(target)["font-size"],
|
||||
equals("5px"));
|
||||
target.classList.add("font-10");
|
||||
target.classList.add("font-12");
|
||||
expect(window.getComputedStyle(target)["font-size"],
|
||||
equals("12px"));
|
||||
target.classList.add("font-24");
|
||||
expect(window.getComputedStyle(target)["font-size"],
|
||||
equals("24px"));
|
||||
target.classList.remove("font-12");
|
||||
expect(window.getComputedStyle(target)["font-size"],
|
||||
equals("24px"));
|
||||
target.classList.remove("font-24");
|
||||
expect(window.getComputedStyle(target)["font-size"],
|
||||
equals("10px"));
|
||||
target.classList.remove("font-10");
|
||||
expect(window.getComputedStyle(target)["font-size"],
|
||||
equals("5px"));
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</sky>
|
||||
@@ -1,5 +0,0 @@
|
||||
Running 1 tests
|
||||
ok 1 createElementNS tests from mozilla, attached to webkit bug 16833 should behave like mozilla
|
||||
1 tests
|
||||
1 pass
|
||||
0 fail
|
||||
@@ -1,112 +0,0 @@
|
||||
<test>
|
||||
<import src="../resources/chai.sky" />
|
||||
<import src="../resources/mocha.sky" />
|
||||
<script>
|
||||
describe('createElementNS tests from mozilla, attached to webkit bug 16833', function() {
|
||||
it('should behave like mozilla', function() {
|
||||
function stringForExceptionCode(c)
|
||||
{
|
||||
var exceptionName;
|
||||
switch(c) {
|
||||
case DOMException.INVALID_CHARACTER_ERR:
|
||||
exceptionName = "INVALID_CHARACTER_ERR";
|
||||
break;
|
||||
case DOMException.NAMESPACE_ERR:
|
||||
exceptionName = "NAMESPACE_ERR";
|
||||
}
|
||||
if (exceptionName)
|
||||
return exceptionName; // + "(" + c + ")";
|
||||
return c;
|
||||
}
|
||||
|
||||
function assertExceptionCode(exception, expect, m)
|
||||
{
|
||||
var actual = exception.code;
|
||||
if (actual !== expect) {
|
||||
m += "; expected " + stringForExceptionCode(expect) + ", threw " + stringForExceptionCode(actual);
|
||||
assert.ok(false, m);
|
||||
} else {
|
||||
m += "; threw " + exception.toString();
|
||||
assert.ok(true, m);
|
||||
}
|
||||
}
|
||||
|
||||
var allNoNSTests = [
|
||||
{ args: [undefined] },
|
||||
{ args: [null] },
|
||||
{ args: [""], code: 5 },
|
||||
{ args: ["<div>"], code: 5 },
|
||||
{ args: ["0div"], code: 5 },
|
||||
{ args: ["di v"], code: 5 },
|
||||
{ args: ["di<v"], code: 5 },
|
||||
{ args: ["-div"], code: 5 },
|
||||
{ args: [".div"], code: 5 },
|
||||
{ args: [":"], message: "valid XML name, invalid QName" },
|
||||
{ args: [":div"], message: "valid XML name, invalid QName" },
|
||||
{ args: ["div:"], message: "valid XML name, invalid QName" },
|
||||
{ args: ["d:iv"] },
|
||||
{ args: ["a:b:c"], message: "valid XML name, invalid QName" },
|
||||
{ args: ["a::c"], message: "valid XML name, invalid QName" },
|
||||
{ args: ["a::c:"], message: "valid XML name, invalid QName" },
|
||||
{ args: ["a:0"], message: "valid XML name, not a valid QName" },
|
||||
{ args: ["0:a"], code: 5, message: "0 at start makes it not a valid XML name" },
|
||||
{ args: ["a:_"] },
|
||||
{ args: ["a:\u0BC6"],
|
||||
message: "non-ASCII character after colon is CombiningChar, which is " +
|
||||
"valid in pre-namespace XML" },
|
||||
{ args: ["\u0BC6:a"], code: 5, message: "not a valid start character" },
|
||||
{ args: ["a:a\u0BC6"] },
|
||||
{ args: ["a\u0BC6:a"] },
|
||||
{ args: ["xml:test"] },
|
||||
{ args: ["xmlns:test"] },
|
||||
{ args: ["x:test"] },
|
||||
{ args: ["xmlns:test"] },
|
||||
{ args: ["SOAP-ENV:Body"] }, // From Yahoo Mail Beta
|
||||
];
|
||||
|
||||
function sourceify(v)
|
||||
{
|
||||
switch (typeof v) {
|
||||
case "undefined":
|
||||
return v;
|
||||
case "string":
|
||||
return '"' + v.replace('"', '\\"') + '"';
|
||||
default:
|
||||
return String(v);
|
||||
}
|
||||
}
|
||||
|
||||
function sourceifyArgs(args)
|
||||
{
|
||||
var copy = new Array(args.length);
|
||||
for (var i = 0, sz = args.length; i < sz; i++)
|
||||
copy[i] = sourceify(args[i]);
|
||||
|
||||
return copy.join(", ");
|
||||
}
|
||||
|
||||
function runNSTests(tests, doc, createFunctionName)
|
||||
{
|
||||
for (var i = 0, sz = tests.length; i < sz; i++) {
|
||||
var test = tests[i];
|
||||
|
||||
var code = -1;
|
||||
var argStr = sourceifyArgs(test.args);
|
||||
var msg = createFunctionName + "(" + argStr + ")";
|
||||
if ("message" in test)
|
||||
msg += "; " + test.message;
|
||||
try {
|
||||
doc[createFunctionName].apply(doc, test.args);
|
||||
assert(!("code" in test), msg);
|
||||
} catch (e) {
|
||||
assertExceptionCode(e, test.code || "expected no exception", msg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var doc = new Document();
|
||||
runNSTests(allNoNSTests, doc, "createElement");
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</test>
|
||||
@@ -1 +0,0 @@
|
||||
PASS
|
||||
@@ -1,8 +0,0 @@
|
||||
<script>
|
||||
import "dart:sky" as sky;
|
||||
import "dart:sky.internals" as internals;
|
||||
|
||||
void main() {
|
||||
internals.notifyTestComplete(sky.window.document is sky.Document ? "PASS" : "FAIL");
|
||||
}
|
||||
</script>>
|
||||
@@ -1,18 +0,0 @@
|
||||
<foo>
|
||||
<import src="../resources/run-after-display.sky" />
|
||||
|
||||
<img src="http://storage.googleapis.com/mojo/sky-pngs/9a7b59f74e2bbcd0d0ceee17ead05b0da64a2af7" />
|
||||
|
||||
<script>
|
||||
import "dart:sky";
|
||||
import "dart:sky.internals" as internals;
|
||||
|
||||
void main() {
|
||||
window.addEventListener('load', (_) {
|
||||
runAfterDisplay(() {
|
||||
internals.notifyTestComplete("");
|
||||
});
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</foo>
|
||||
@@ -1,15 +0,0 @@
|
||||
<foo>
|
||||
<import src="../resources/run-after-display.sky" />
|
||||
|
||||
<p style="filter: grayscale(1) blur(2px); color: green;">This should be gray and blurred</p>
|
||||
|
||||
<script>
|
||||
import "dart:sky.internals" as internals;
|
||||
|
||||
void main() {
|
||||
runAfterDisplay(() {
|
||||
internals.notifyTestComplete("");
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</foo>
|
||||
@@ -1,7 +0,0 @@
|
||||
layer at (0,0) size 800x600
|
||||
RenderView {#document} at (0,0) size 800x600
|
||||
RenderFlexibleBox {foo} at (0,0) size 800x19
|
||||
RenderParagraph {p} at (0,0) size 800x19
|
||||
RenderText {#text} at (0,0) size 99x19
|
||||
text run at (0,0) width 99: "Hello World!"
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
<foo>
|
||||
<import src="../resources/dump-as-render-tree.sky" />
|
||||
<p>Hello World!</p>
|
||||
</foo>
|
||||
@@ -1,10 +0,0 @@
|
||||
layer at (0,0) size 800x600
|
||||
RenderView {#document} at (0,0) size 800x600
|
||||
RenderFlexibleBox {div} at (0,0) size 800x137
|
||||
RenderParagraph {p} at (32,32) size 736x38
|
||||
RenderText {#text} at (0,0) size 191x38
|
||||
text run at (0,0) width 191: "about:blank"
|
||||
RenderParagraph {p} at (16,110) size 768x19 [color=#BCD8F5]
|
||||
RenderText {#text} at (0,0) size 152x19
|
||||
text run at (0,0) width 152: "Welcome to Sky!"
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
<div>
|
||||
<style>
|
||||
.h1 { font-size: 2em; margin: 1em; }
|
||||
.p { margin: 0.5em 1em; color: #bcd8f5; font-weight: 900; }
|
||||
</style>
|
||||
<p class="h1">about:blank</p>
|
||||
<p class="p">Welcome to Sky!</p>
|
||||
<script>
|
||||
import "dart:sky" as sky;
|
||||
import "dart:sky.internals" as internals;
|
||||
|
||||
// Don't use dump-as-render-tree.sky, we want a test with no imports.
|
||||
void main() {
|
||||
sky.window.addEventListener('load', (_) =>
|
||||
internals.notifyTestComplete(internals.renderTreeAsText()));
|
||||
}
|
||||
</script>
|
||||
</div>
|
||||
@@ -1,6 +0,0 @@
|
||||
layer at (0,0) size 800x600
|
||||
RenderView {#document} at (0,0) size 800x600
|
||||
RenderFlexibleBox {foo} at (0,0) size 800x89
|
||||
RenderImage {img} at (0,0) size 800x64
|
||||
RenderImage {img} at (0,64) size 100x25
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
<foo>
|
||||
<import src="../resources/dump-as-render-tree.sky" as="harness" />
|
||||
|
||||
<img src="resources/palatted-color-png-gamma-one-color-profile.png" />
|
||||
<img src="resources/palatted-color-png-gamma-one-color-profile.png" style="width: 100px;" />
|
||||
|
||||
</foo>
|
||||
@@ -1,18 +0,0 @@
|
||||
<foo>
|
||||
<import src="../resources/run-after-display.sky" />
|
||||
|
||||
<img src="http://storage.googleapis.com/mojo/sky-pngs/8ce0b808d5248b9e7ed051046def933f6ffaa889" />
|
||||
|
||||
<script>
|
||||
import "dart:sky";
|
||||
import "dart:sky.internals" as internals;
|
||||
|
||||
void main() {
|
||||
window.addEventListener('load', (_) {
|
||||
runAfterDisplay(() {
|
||||
internals.notifyTestComplete("");
|
||||
});
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</foo>
|
||||
@@ -1,80 +0,0 @@
|
||||
<sky>
|
||||
|
||||
<import src="../resources/run-after-display.sky" />
|
||||
<style>
|
||||
sky {
|
||||
padding: 10px;
|
||||
}
|
||||
div {
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
</style>
|
||||
Transforms
|
||||
<div style="transform: translate3d(10px, 10px, 0); background-color: pink;">
|
||||
One
|
||||
<div style="transform: translate3d(10px, 10px, 0); background-color: salmon;">
|
||||
Two
|
||||
<div style="transform: translate3d(10px, 10px, 0); background-color: papayawhip;">
|
||||
Three
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="position: absolute; top: 250px;">
|
||||
Opacity
|
||||
<div style="opacity: 0.8; background-color: pink; transform: translate3d(0, 0, 0)">
|
||||
One
|
||||
<div style="opacity: 0.7; position: absolute; left: 15px; top: 10px; background-color: salmon;">
|
||||
Two
|
||||
<div style="opacity: 0.6; position: absolute; left: 15px; top: 10px; background-color: papayawhip;">
|
||||
Three
|
||||
<div style="opacity: 0; transform: translate3d(0, 10px, 0); background-color: papayawhip;">
|
||||
Clear
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div style="position: absolute; right: 50px;">
|
||||
<div style="background-color: red;">
|
||||
1
|
||||
</div>
|
||||
<div style="position: absolute; left: 40px; top: 40px; z-index: 2; background-color: pink;">
|
||||
4
|
||||
</div>
|
||||
<div style="position: absolute; left: 20px; top: 20px; z-index: 0; background-color: salmon;">
|
||||
2
|
||||
</div>
|
||||
<div style="position: absolute; left: 35px; top: 20px; z-index: 1; background-color: papayawhip;">
|
||||
3
|
||||
</div>
|
||||
<div style="background-color: green;">
|
||||
1
|
||||
</div>
|
||||
z-index
|
||||
</div>
|
||||
|
||||
<div style="position: absolute; bottom: 50px;">
|
||||
Clip-path
|
||||
<div style="background-color: pink; -webkit-clip-path: circle(25px at 25px 25px);">
|
||||
<div style="background-color: salmon; -webkit-clip-path: circle(25px at 35px 35px);">
|
||||
<div style="background-color: papayawhip; -webkit-clip-path: circle(25px at 45px 45px);"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
import "dart:sky.internals" as internals;
|
||||
|
||||
void main() {
|
||||
runAfterDisplay(() {
|
||||
internals.notifyTestComplete("");
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
</sky>
|
||||
@@ -1,12 +0,0 @@
|
||||
CONSOLE: unittest-suite-wait-for-done
|
||||
CONSOLE: PASS: should find elements by class name
|
||||
CONSOLE: PASS: should find elements by id
|
||||
CONSOLE: PASS: should find elements by tag name
|
||||
CONSOLE: PASS: should find an element by compound selector
|
||||
CONSOLE: PASS: should find all elements by compound selector
|
||||
CONSOLE: PASS: should find all elements by attribute presence selector
|
||||
CONSOLE: PASS: should find all elements by attribute value selector
|
||||
CONSOLE:
|
||||
CONSOLE: All 7 tests passed.
|
||||
CONSOLE: unittest-suite-success
|
||||
DONE
|
||||
@@ -1,84 +0,0 @@
|
||||
<html>
|
||||
<div id="tests">
|
||||
<div id="id1">
|
||||
<div class="class2"></div>
|
||||
</div>
|
||||
<tag-name-3 class="class7" id="tag1"></tag-name-3>
|
||||
<tag-name-3 class="class7" id="tag2"></tag-name-3>
|
||||
<span class="class2">
|
||||
<span class="class5" id="id5" testAttr></span>
|
||||
</span>
|
||||
<div id="id5"></div>
|
||||
<tag-name-6 class="class6" id="id6" testAttr="the value">
|
||||
<tag-name-3 class="class7" id="tag2"></tag-name-3>
|
||||
</tag-name-6>
|
||||
</div>
|
||||
<script>
|
||||
import "../resources/third_party/unittest/unittest.dart";
|
||||
import "../resources/unit.dart";
|
||||
|
||||
import "dart:sky";
|
||||
|
||||
query(selector) => document.querySelector(selector);
|
||||
queryAll(selector) => document.querySelectorAll(selector);
|
||||
|
||||
main() {
|
||||
initUnit();
|
||||
|
||||
test("should find elements by class name", () {
|
||||
expect(query(".class2"), isNotNull);
|
||||
expect(query(".class2").classList.toString(), equals("class2"));
|
||||
expect(queryAll(".class2").length, 2);
|
||||
expect(queryAll(".class2")[0].classList.toString(), equals("class2"));
|
||||
expect(queryAll(".class2")[1].classList.toString(), equals("class2"));
|
||||
expect(queryAll(".class2")[0], isNot(equals(queryAll(".class2")[1])));
|
||||
});
|
||||
|
||||
test("should find elements by id", () {
|
||||
expect(query("#id5"), isNotNull);
|
||||
expect(query("#id5").getAttribute("id"), equals("id5"));
|
||||
expect(query("#id5").classList.toString(), equals("class5"));
|
||||
// FIXME(sky): Do we still want to allow multiple id stuff like this?
|
||||
expect(queryAll("#id5").length, equals(2));
|
||||
expect(queryAll("#id5")[0], equals(query("#id5")));
|
||||
expect(queryAll("#id5")[1], isNot(equals(query("#id5"))));
|
||||
expect(queryAll("#id5")[1].getAttribute("id"), equals("id5"));
|
||||
});
|
||||
|
||||
test("should find elements by tag name", () {
|
||||
expect(query("tag-name-6"), isNotNull);
|
||||
expect(query("tag-name-6").tagName, equals("tag-name-6"));
|
||||
expect(query("tag-name-6").classList.toString(), equals("class6"));
|
||||
var context = query("#tests");
|
||||
expect(context.querySelectorAll("span").length, equals(2));
|
||||
});
|
||||
|
||||
test("should find an element by compound selector", () {
|
||||
expect(query("tag-name-6.class6#id6"), isNotNull);
|
||||
expect(query("tag-name-6.class6#id6").getAttribute("id"), equals("id6"));
|
||||
expect(query("tag-name-6.class6#id6").classList.toString(), equals("class6"));
|
||||
expect(query("tag-name-6.class6#id6").tagName, equals("tag-name-6"));
|
||||
});
|
||||
|
||||
test("should find all elements by compound selector", () {
|
||||
expect(queryAll("tag-name-3.class7"), isNotNull);
|
||||
expect(queryAll("tag-name-3.class7").length, equals(3));
|
||||
expect(queryAll("tag-name-3.class7")[0].getAttribute("id"), equals("tag1"));
|
||||
expect(queryAll("tag-name-3.class7")[1].getAttribute("id"), equals("tag2"));
|
||||
});
|
||||
|
||||
test("should find all elements by attribute presence selector", () {
|
||||
expect(queryAll("[testAttr]"), isNotNull);
|
||||
expect(queryAll("[testAttr]").length, equals(2));
|
||||
expect(queryAll("[testAttr]")[0].getAttribute("id"), equals("id5"));
|
||||
expect(queryAll("[testAttr]")[1].getAttribute("id"), equals("id6"));
|
||||
});
|
||||
|
||||
test("should find all elements by attribute value selector", () {
|
||||
expect(queryAll("[testAttr='the value']"), isNotNull);
|
||||
expect(queryAll("[testAttr='the value']").length, equals(1));
|
||||
expect(queryAll("[testAttr='the value']")[0].getAttribute("id"), equals("id6"));
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</html>
|
||||
@@ -1,6 +0,0 @@
|
||||
PASS: <div class= id=id1> order was 1
|
||||
PASS: <div class=class2 id=null> order was 2
|
||||
PASS: <tag-name-3 class= id=null> order was 3
|
||||
PASS: <div class=class4 class4 id=null> order was 4
|
||||
PASS: <div class=class5 id=id5> order was 5
|
||||
PASS: <tag-name-6 class=class6 id=id6> order was 6
|
||||
@@ -1,49 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<import src="../resources/dump-as-text.sky" />
|
||||
<style>
|
||||
#id1 { order: 1; }
|
||||
.class2 { order: 2; }
|
||||
tag-name-3 { order: 3; }
|
||||
.class4.class4 { order: 4; }
|
||||
.class5#id5 { order: 5; }
|
||||
tag-name-6.class6#id6 { order: 6; }
|
||||
</style>
|
||||
<body>
|
||||
<div id="tests">
|
||||
<div id="id1"></div>
|
||||
<div class="class2"></div>
|
||||
<tag-name-3></tag-name-3>
|
||||
<div class="class4 class4"></div>
|
||||
<div class="class5" id="id5"></div>
|
||||
<tag-name-6 class="class6" id="id6"></tag-name-6>
|
||||
</div>
|
||||
<div id="log"></div>
|
||||
<script>
|
||||
import "dart:sky";
|
||||
|
||||
main() {
|
||||
var tests = document.getElementById("tests");
|
||||
var log = document.getElementById("log");
|
||||
var i = 1;
|
||||
for (Element element = tests.firstElementChild; element != null; element = element.nextElementSibling) {
|
||||
var order = int.parse(window.getComputedStyle(element)["order"]);
|
||||
var p = document.createElement("p");
|
||||
var text = (order == i) ? "PASS" : "FAIL";
|
||||
text += ": <"
|
||||
+ element.tagName
|
||||
+ " class="
|
||||
+ element.classList.toString()
|
||||
+ " id=" + element.getAttribute("id").toString()
|
||||
+ "> order was "
|
||||
+ order.toString();
|
||||
if (order != i)
|
||||
text += " expected " + i;
|
||||
p.textContent = text;
|
||||
log.appendChild(p);
|
||||
++i;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,6 +0,0 @@
|
||||
CONSOLE: unittest-suite-wait-for-done
|
||||
CONSOLE: PASS: should not exist
|
||||
CONSOLE:
|
||||
CONSOLE: All 1 tests passed.
|
||||
CONSOLE: unittest-suite-success
|
||||
DONE
|
||||
@@ -1,25 +0,0 @@
|
||||
<html>
|
||||
<style>
|
||||
#sandbox { color: red; }
|
||||
.blue { color: blue; }
|
||||
</style>
|
||||
<body>
|
||||
<div id="sandbox" class="blue">This should be blue.</div>
|
||||
<script>
|
||||
import "../resources/third_party/unittest/unittest.dart";
|
||||
import "../resources/unit.dart";
|
||||
|
||||
import "dart:sky";
|
||||
|
||||
main() {
|
||||
initUnit();
|
||||
|
||||
test('should not exist', () {
|
||||
var sandbox = document.getElementById("sandbox");
|
||||
expect(window.getComputedStyle(sandbox)["color"],
|
||||
equals("rgb(0, 0, 255)"));
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1 +0,0 @@
|
||||
This is a dump-as-text test.
|
||||
@@ -1,6 +0,0 @@
|
||||
<html>
|
||||
<import src="../resources/dump-as-text.sky" />
|
||||
<p>
|
||||
This is a dump-as-text test.
|
||||
</p>
|
||||
</html>
|
||||
@@ -1,5 +0,0 @@
|
||||
Running 1 tests
|
||||
ok 1 Application should have a constructor
|
||||
1 tests
|
||||
1 pass
|
||||
0 fail
|
||||
@@ -1,14 +0,0 @@
|
||||
<html>
|
||||
<import src="../resources/chai.sky" />
|
||||
<import src="../resources/mocha.sky" />
|
||||
<script>
|
||||
describe('Application', function() {
|
||||
it('should have a constructor', function() {
|
||||
var doc = new Document();
|
||||
var app = new Application(doc, "http://www.example.com/app");
|
||||
assert.equal(app.document, doc);
|
||||
assert.equal(app.url, "http://www.example.com/app");
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</html>
|
||||
@@ -1 +0,0 @@
|
||||
PASS: pass.sky succesfully exported this string.
|
||||
@@ -1,12 +0,0 @@
|
||||
<html>
|
||||
<import src="../resources/dump-as-text.sky" />
|
||||
<import src="resources/pass.sky" as="hello" />
|
||||
<p id="result">FAIL</p>
|
||||
<script>
|
||||
import "dart:sky";
|
||||
|
||||
void main() {
|
||||
document.getElementById("result").textContent = hello.kHello;
|
||||
}
|
||||
</script>
|
||||
</html>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user