celerity 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (127) hide show
  1. data/History.txt +15 -1
  2. data/Manifest.txt +174 -0
  3. data/README.txt +19 -10
  4. data/config/hoe.rb +68 -0
  5. data/config/requirements.rb +15 -0
  6. data/lib/celerity.rb +14 -11
  7. data/lib/celerity/collections.rb +37 -8
  8. data/lib/celerity/container.rb +100 -3
  9. data/lib/celerity/disabled_element.rb +4 -2
  10. data/lib/celerity/element.rb +21 -8
  11. data/lib/celerity/element_collections.rb +4 -7
  12. data/lib/celerity/element_locator.rb +1 -0
  13. data/lib/celerity/elements/button.rb +6 -2
  14. data/lib/celerity/elements/file_field.rb +1 -1
  15. data/lib/celerity/elements/form.rb +1 -2
  16. data/lib/celerity/elements/frame.rb +0 -3
  17. data/lib/celerity/elements/image.rb +1 -4
  18. data/lib/celerity/elements/label.rb +1 -0
  19. data/lib/celerity/elements/link.rb +2 -0
  20. data/lib/celerity/elements/option.rb +1 -0
  21. data/lib/celerity/elements/radio_check.rb +3 -5
  22. data/lib/celerity/elements/select_list.rb +3 -10
  23. data/lib/celerity/elements/table.rb +8 -22
  24. data/lib/celerity/elements/table_body.rb +5 -11
  25. data/lib/celerity/elements/table_cell.rb +1 -0
  26. data/lib/celerity/elements/table_footer.rb +30 -0
  27. data/lib/celerity/elements/table_header.rb +30 -0
  28. data/lib/celerity/elements/table_row.rb +5 -3
  29. data/lib/celerity/elements/text_field.rb +18 -13
  30. data/lib/celerity/exception.rb +8 -8
  31. data/lib/celerity/extra/method_generator.rb +5 -2
  32. data/lib/celerity/htmlunit/htmlunit-2.2-SNAPSHOT.jar +0 -0
  33. data/lib/celerity/ie.rb +195 -141
  34. data/lib/celerity/non_control_elements.rb +30 -4
  35. data/lib/celerity/version.rb +1 -1
  36. data/lib/celerity/watir_compatibility.rb +62 -0
  37. data/setup.rb +0 -2
  38. data/spec/area_spec.rb +4 -1
  39. data/spec/areas_spec.rb +1 -1
  40. data/spec/button_spec.rb +35 -17
  41. data/spec/buttons_spec.rb +1 -1
  42. data/spec/checkbox_spec.rb +6 -4
  43. data/spec/checkboxes_spec.rb +1 -1
  44. data/spec/div_spec.rb +20 -19
  45. data/spec/divs_spec.rb +2 -2
  46. data/spec/element_spec.rb +13 -2
  47. data/spec/filefield_spec.rb +6 -3
  48. data/spec/filefields_spec.rb +1 -1
  49. data/spec/form_spec.rb +4 -1
  50. data/spec/forms_spec.rb +1 -1
  51. data/spec/frame_spec.rb +6 -2
  52. data/spec/hidden_spec.rb +8 -4
  53. data/spec/hiddens_spec.rb +1 -1
  54. data/spec/hn_spec.rb +86 -0
  55. data/spec/hns_spec.rb +41 -0
  56. data/spec/html/bug_duplicate_attributes.html +14 -0
  57. data/spec/html/bug_javascript_001.html +11 -0
  58. data/spec/html/forms_with_input_elements.html +11 -11
  59. data/spec/html/images.html +18 -15
  60. data/spec/html/latin1_text.html +16 -0
  61. data/spec/html/non_control_elements.html +28 -4
  62. data/spec/html/tables.html +3 -3
  63. data/spec/html/utf8_text.html +15 -0
  64. data/spec/htmlunit_spec.rb +27 -0
  65. data/spec/ie_spec.rb +47 -12
  66. data/spec/image_spec.rb +4 -7
  67. data/spec/images_spec.rb +3 -2
  68. data/spec/label_spec.rb +4 -3
  69. data/spec/labels_spec.rb +1 -1
  70. data/spec/li_spec.rb +11 -8
  71. data/spec/link_spec.rb +5 -1
  72. data/spec/links_spec.rb +2 -1
  73. data/spec/lis_spec.rb +3 -2
  74. data/spec/map_spec.rb +4 -1
  75. data/spec/maps_spec.rb +1 -1
  76. data/spec/meta_spec.rb +6 -0
  77. data/spec/ol_spec.rb +73 -0
  78. data/spec/ols_spec.rb +41 -0
  79. data/spec/option_spec.rb +129 -0
  80. data/spec/p_spec.rb +4 -1
  81. data/spec/pre_spec.rb +4 -1
  82. data/spec/pres_spec.rb +1 -1
  83. data/spec/ps_spec.rb +2 -1
  84. data/spec/radio_spec.rb +7 -19
  85. data/spec/radios_spec.rb +1 -1
  86. data/spec/select_list_spec.rb +19 -57
  87. data/spec/select_lists_spec.rb +3 -2
  88. data/spec/span_spec.rb +8 -5
  89. data/spec/spans_spec.rb +2 -1
  90. data/spec/spec_helper.rb +8 -43
  91. data/spec/table_bodies_spec.rb +17 -4
  92. data/spec/table_body_spec.rb +47 -16
  93. data/spec/table_cell_spec.rb +5 -3
  94. data/spec/table_cells_spec.rb +1 -1
  95. data/spec/table_footer_spec.rb +94 -0
  96. data/spec/table_footers_spec.rb +53 -0
  97. data/spec/table_header_spec.rb +94 -0
  98. data/spec/table_headers_spec.rb +53 -0
  99. data/spec/table_row_spec.rb +25 -4
  100. data/spec/table_rows_spec.rb +1 -1
  101. data/spec/table_spec.rb +22 -2
  102. data/spec/tables_spec.rb +2 -1
  103. data/spec/text_field_spec.rb +52 -20
  104. data/spec/text_fields_spec.rb +1 -1
  105. data/spec/ul_spec.rb +73 -0
  106. data/spec/uls_spec.rb +41 -0
  107. data/spec/watir_compatability_spec.rb +253 -0
  108. data/support/celerity_viewer/rubycocoa/CelerityViewer.icns +0 -0
  109. data/support/celerity_viewer/rubycocoa/English.lproj/Main.nib/classes.nib +37 -0
  110. data/support/celerity_viewer/rubycocoa/English.lproj/Main.nib/info.nib +19 -0
  111. data/support/celerity_viewer/rubycocoa/English.lproj/Main.nib/keyedobjects.nib +0 -0
  112. data/support/celerity_viewer/rubycocoa/Info.plist.erb +28 -0
  113. data/support/celerity_viewer/rubycocoa/MainController.rb +23 -0
  114. data/support/celerity_viewer/rubycocoa/README +94 -0
  115. data/support/celerity_viewer/rubycocoa/Rakefile +100 -0
  116. data/support/celerity_viewer/rubycocoa/distributed_viewer.rb +86 -0
  117. data/support/celerity_viewer/rubycocoa/main.m +7 -0
  118. data/support/celerity_viewer/rubycocoa/main.rb +27 -0
  119. data/support/spec_server.rb +64 -0
  120. data/tasks/benchmark.rake +1 -0
  121. data/tasks/rdoc.rake +4 -0
  122. data/tasks/rspec.rake +10 -3
  123. data/tasks/simple_ci.rake +94 -0
  124. data/tasks/specserver.rake +21 -0
  125. metadata +160 -114
  126. data/spec/table_bodies.rb +0 -40
  127. data/tasks/testserver.rake +0 -32
@@ -1,6 +1,6 @@
1
1
  require File.dirname(__FILE__) + '/spec_helper.rb'
2
2
 
3
- describe "FileField" do
3
+ describe FileField do
4
4
  before :all do
5
5
  @browser = IE.new
6
6
  add_spec_checker(@browser)
@@ -21,7 +21,9 @@ describe "FileField" do
21
21
  @browser.file_field(:index, 1).should exist
22
22
  @browser.file_field(:xpath, "//input[@id='new_user_portrait']").should exist
23
23
  end
24
-
24
+ it "should return true if the element exists (default how = :name)" do
25
+ @browser.file_field("new_user_portrait").should exist
26
+ end
25
27
  it "should return false if the file field doesn't exist" do
26
28
  @browser.file_field(:id, 'no_such_id').should_not exist
27
29
  @browser.file_field(:id, /no_such_id/).should_not exist
@@ -90,9 +92,10 @@ describe "FileField" do
90
92
  # Manipulation methods
91
93
 
92
94
  describe "#set" do
93
- it "should be able to set a file path in the field and click the upload button" do
95
+ it "should be able to set a file path in the field and click the upload button and fire the onchange event" do
94
96
  @browser.file_field(:name, "new_user_portrait").set(__FILE__)
95
97
  @browser.file_field(:name, "new_user_portrait").value.should == __FILE__
98
+ @browser.div(:id, 'changed_language').text.should == "File onchange triggered"
96
99
  @browser.button(:name, "new_user_submit").click
97
100
  end
98
101
  end
@@ -1,6 +1,6 @@
1
1
  require File.dirname(__FILE__) + '/spec_helper.rb'
2
2
 
3
- describe "FileFields" do
3
+ describe FileFields do
4
4
 
5
5
  before :all do
6
6
  @browser = IE.new
@@ -1,6 +1,6 @@
1
1
  require File.dirname(__FILE__) + '/spec_helper.rb'
2
2
 
3
- describe "Form" do
3
+ describe Form do
4
4
  before :all do
5
5
  @browser = IE.new
6
6
  add_spec_checker(@browser)
@@ -23,6 +23,9 @@ describe "Form" do
23
23
  @browser.form(:index, 1).should exist
24
24
  @browser.form(:xpath, "//form[@id='new_user']").should exist
25
25
  end
26
+ it "should return true if the element exists (default how = :name)" do
27
+ @browser.form("user_new").should exist
28
+ end
26
29
  it "should return false if the form doesn't exist" do
27
30
  @browser.form(:id, 'no_such_id').should_not exist
28
31
  @browser.form(:id, /no_such_id/).should_not exist
@@ -1,6 +1,6 @@
1
1
  require File.dirname(__FILE__) + '/spec_helper.rb'
2
2
 
3
- describe "Forms" do
3
+ describe Forms do
4
4
 
5
5
  before :all do
6
6
  @browser = IE.new
@@ -1,6 +1,6 @@
1
1
  require File.dirname(__FILE__) + '/spec_helper.rb'
2
2
 
3
- describe "Frame" do
3
+ describe Frame do
4
4
  before :all do
5
5
  @browser = IE.new
6
6
  add_spec_checker(@browser)
@@ -44,7 +44,11 @@ describe "Frame" do
44
44
  @browser.frame(:index, 1).should exist
45
45
  @browser.frame(:xpath, "//iframe[@id='frame_1']").should exist
46
46
  end
47
- #TODO: default how = name
47
+ it "should return true if the element exists (default how = :name)" do
48
+ @browser.frame("frame1").should exist
49
+ @browser.goto(TEST_HOST + "/iframes.html")
50
+ @browser.frame("frame1").should exist
51
+ end
48
52
  it "should return false if the frame doesn't exist" do
49
53
  @browser.frame(:id, "no_such_id").should_not exist
50
54
  @browser.frame(:id, /no_such_id/).should_not exist
@@ -1,8 +1,6 @@
1
1
  require File.dirname(__FILE__) + '/spec_helper.rb'
2
2
 
3
- # TODO: specs for exceptions
4
-
5
- describe "Hidden" do
3
+ describe Hidden do
6
4
 
7
5
  before :all do
8
6
  @browser = IE.new
@@ -30,6 +28,9 @@ describe "Hidden" do
30
28
  @browser.hidden(:index, 1).should exist
31
29
  @browser.hidden(:xpath, "//input[@id='new_user_interests_dolls']").should exist
32
30
  end
31
+ it "should return true if the element exists (default how = :name)" do
32
+ @browser.hidden("new_user_interests").should exist
33
+ end
33
34
  it "should return false if the element does not exist" do
34
35
  @browser.hidden(:id, 'no_such_id').should_not exist
35
36
  @browser.hidden(:id, /no_such_id/).should_not exist
@@ -86,7 +87,7 @@ describe "Hidden" do
86
87
  @browser.hidden(:index, 1).value.should == "dolls"
87
88
  end
88
89
  it "should raise UnknownObjectException if the text field doesn't exist" do
89
- lambda { @browser.hidden(:index, 1337).value }.should raise_error(UnknownObjectException)
90
+ lambda { @browser.hidden(:index, 1337).value }.should raise_error(UnknownObjectException)
90
91
  end
91
92
  end
92
93
 
@@ -96,6 +97,9 @@ describe "Hidden" do
96
97
  @browser.hidden(:id, 'new_user_interests_dolls').value = 'guns'
97
98
  @browser.hidden(:id, "new_user_interests_dolls").value.should == 'guns'
98
99
  end
100
+ it "should raise UnknownObjectException if the text field doesn't exist" do
101
+ lambda { @browser.hidden(:id, 'no_such_id').value = 'guns' }.should raise_error(UnknownObjectException)
102
+ end
99
103
  end
100
104
 
101
105
  after :all do
@@ -1,6 +1,6 @@
1
1
  require File.dirname(__FILE__) + '/spec_helper.rb'
2
2
 
3
- describe "Hiddens" do
3
+ describe Hiddens do
4
4
  before :all do
5
5
  @browser = IE.new
6
6
  add_spec_checker(@browser)
@@ -0,0 +1,86 @@
1
+ require File.dirname(__FILE__) + '/spec_helper.rb'
2
+
3
+ describe H1, H2, H3, H4, H5, H6 do
4
+
5
+ before :all do
6
+ @browser = IE.new
7
+ add_spec_checker(@browser)
8
+ end
9
+
10
+ before :each do
11
+ @browser.goto(TEST_HOST + "/non_control_elements.html")
12
+ end
13
+
14
+ # Exists method
15
+ describe "#exist?" do
16
+ it "should return true if the element exists" do
17
+ @browser.h1(:id, "first_header").should exist
18
+ @browser.h1(:id, /first_header/).should exist
19
+ @browser.h1(:text, "Header 1").should exist
20
+ @browser.h1(:text, /Header 1/).should exist
21
+ @browser.h1(:index, 1).should exist
22
+ @browser.h1(:xpath, "//h1[@id='first_header']").should exist
23
+ end
24
+ it "should return true if the element exists (default how = :id)" do
25
+ @browser.h1("first_header").should exist
26
+ end
27
+ it "should return true if the element exists" do
28
+ @browser.h1(:id, "no_such_id").should_not exist
29
+ @browser.h1(:id, /no_such_id/).should_not exist
30
+ @browser.h1(:text, "no_such_text").should_not exist
31
+ @browser.h1(:text, /no_such_text 1/).should_not exist
32
+ @browser.h1(:index, 1337).should_not exist
33
+ @browser.h1(:xpath, "//p[@id='no_such_id']").should_not exist
34
+ end
35
+ it "should raise ArgumentError when 'what' argument is invalid" do
36
+ lambda { @browser.h1(:id, 3.14).exists? }.should raise_error(ArgumentError)
37
+ end
38
+ it "should raise MissingWayOfFindingObjectException when 'how' argument is invalid" do
39
+ lambda { @browser.h1(:no_such_how, 'some_value').exists? }.should raise_error(MissingWayOfFindingObjectException)
40
+ end
41
+ end
42
+
43
+ # Attribute methods
44
+ describe "#class_name" do
45
+ it "should return the class attribute" do
46
+ @browser.h1(:index, 1).class_name.should == 'primary'
47
+ end
48
+ it "should return an empty string if the element exists and the attribute doesn't" do
49
+ @browser.h2(:index, 1).class_name.should == ''
50
+ end
51
+ it "should raise UnknownObjectException if the p doesn't exist" do
52
+ lambda { @browser.h2(:id, 'no_such_id').class_name }.should raise_error(UnknownObjectException)
53
+ end
54
+ end
55
+
56
+ describe "#id" do
57
+ it "should return the id attribute" do
58
+ @browser.h1(:index, 1).id.should == "first_header"
59
+ end
60
+ it "should return an empty string if the element exists and the attribute doesn't" do
61
+ @browser.h2(:index, 1).id.should == ''
62
+ end
63
+ it "should raise UnknownObjectException if the p doesn't exist" do
64
+ lambda { @browser.h1(:id, "no_such_id").id }.should raise_error(UnknownObjectException)
65
+ lambda { @browser.h1(:index, 1337).id }.should raise_error(UnknownObjectException)
66
+ end
67
+ end
68
+
69
+ describe "#text" do
70
+ it "should return the text of the element" do
71
+ @browser.h1(:index, 1).text.should == 'Header 1'
72
+ end
73
+ it "should return an empty string if the element doesn't contain any text" do
74
+ @browser.h6(:index, 1).text.should == ''
75
+ end
76
+ it "should raise UnknownObjectException if the p doesn't exist" do
77
+ lambda { @browser.h1(:id, 'no_such_id').text }.should raise_error( UnknownObjectException)
78
+ lambda { @browser.h1(:xpath , "//h1[@id='no_such_id']").text }.should raise_error( UnknownObjectException)
79
+ end
80
+ end
81
+
82
+ after :all do
83
+ @browser.close
84
+ end
85
+
86
+ end
@@ -0,0 +1,41 @@
1
+ require File.dirname(__FILE__) + '/spec_helper.rb'
2
+
3
+ describe H1s, H2s, H3s, H4s, H5s, H6s do
4
+
5
+ before :all do
6
+ @browser = IE.new
7
+ add_spec_checker(@browser)
8
+ end
9
+
10
+ before :each do
11
+ @browser.goto(TEST_HOST + "/non_control_elements.html")
12
+ end
13
+
14
+ describe "#length" do
15
+ it "should return the number of h1s" do
16
+ @browser.h2s.length.should == 8
17
+ end
18
+ end
19
+
20
+ describe "#[]" do
21
+ it "should return the p at the given index" do
22
+ @browser.h1s[1].id.should == "first_header"
23
+ end
24
+ end
25
+
26
+ describe "#each" do
27
+ it "should iterate through ps correctly" do
28
+ @browser.h2s.each_with_index do |h, index|
29
+ h.name.should == @browser.h2(:index, index+1).name
30
+ h.id.should == @browser.h2(:index, index+1).id
31
+ h.value.should == @browser.h2(:index, index+1).value
32
+ end
33
+ end
34
+ end
35
+
36
+ after :all do
37
+ @browser.close
38
+ end
39
+
40
+ end
41
+
@@ -0,0 +1,14 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
3
+ <head>
4
+ <title>Duplicate attributes</title>
5
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
+ </head>
7
+ <body>
8
+ <form action="">
9
+ <fieldset>
10
+ <input id="org_id" class="numeric" tabindex="1" type="text" name="org_name" id="org_name" value="" />
11
+ </fieldset>
12
+ </form>
13
+ </body>
14
+ </html>
@@ -0,0 +1,11 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
2
+ <html>
3
+ <head>
4
+ <title>java.lang.StackOverflowError</title>
5
+ </head>
6
+ <body>
7
+ <script>
8
+ document.write('<body>bug</body>');
9
+ </script>
10
+ </body>
11
+ </html>
@@ -5,9 +5,9 @@
5
5
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
6
  </head>
7
7
  <body>
8
- <h1><a href="">User administration</a></h1>
8
+ <h1><a href="">User administration</a></h1>
9
9
  <h2>Add user</h2>
10
- <form enctype="multipart/form-data" action="post_to_me" method="post" id="new_user" class="user">
10
+ <form enctype="multipart/form-data" action="post_to_me" method="post" name="user_new" id="new_user" class="user">
11
11
  <fieldset>
12
12
  <legend>Personal information</legend>
13
13
  <label for="new_user_first_name" id="first_label">First name</label>
@@ -18,11 +18,11 @@
18
18
  <input type="text" name="new_user_email" id="new_user_email" /> <br />
19
19
  <label for="new_user_country">Country</label>
20
20
  <select name="new_user_country" id="new_user_country" class="country">
21
- <option class="scandinavia">Denmark</option>
22
- <option class="scandinavia" selected="selected">Norway</option>
23
- <option class="scandinavia">Sweden</option>
24
- <option >United Kingdom</option>
25
- <option >USA</option>
21
+ <option class="scandinavia" value="1">Denmark</option>
22
+ <option id="nor" class="scandinavia" value="2" selected="selected">Norway</option>
23
+ <option class="scandinavia" value="3">Sweden</option>
24
+ <option value="4">United Kingdom</option>
25
+ <option value="5">USA</option>
26
26
  </select> <br />
27
27
  <label for="new_user_occupation">Occupation</label>
28
28
  <input type="text" name="new_user_occupation" id="new_user_occupation" value="Developer" /> <br />
@@ -32,13 +32,13 @@
32
32
  <input type="text" title="Your personal code" name="new_user_code" id="new_user_code" value="HE2FF8" readonly="readonly" /> <br />
33
33
  <label for="new_user_languages">Languages</label>
34
34
  <select name="new_user_languages" id="new_user_languages" multiple="multiple" onchange="document.getElementById('changed_language').innerHTML += 'changed language'">
35
- <option>Danish</option>
35
+ <option id="danish">Danish</option>
36
36
  <option selected="selected">English</option>
37
37
  <option selected="selected">Norwegian</option>
38
38
  <option>Swedish</option>
39
39
  </select> <br />
40
40
  <label for="new_user_portrait">Portrait</label>
41
- <input type="file" name="new_user_portrait" id="new_user_portrait" class="portrait" title="Smile!" /> <br />
41
+ <input type="file" name="new_user_portrait" id="new_user_portrait" class="portrait" title="Smile!" onchange="document.getElementById('changed_language').innerHTML = 'File onchange triggered'" /> <br />
42
42
  <label for="new_user_portrait">Dental records</label>
43
43
  <input type="file" name="new_user_teeth" id="new_user_teeth" title="Smile here too!" />
44
44
  </fieldset>
@@ -97,11 +97,11 @@
97
97
  <select name="delete_user_username" id="delete_user_username">
98
98
  <option>Username 1</option>
99
99
  <option>Username 2</option>
100
- <option>Username 3</option>
100
+ <option onclick="elem = document.getElementById('delete_user_comment'); elem.value = 'Don\'t do it!'; elem.style.color = 'red';">Username 3</option>
101
101
  </select> <br />
102
102
  <label for="delete_user_comment">Comment</label>
103
103
  <textarea name="delete_user_comment" id="delete_user_comment">Default comment.</textarea> <br />
104
- <input type="submit" name="delete_user_submit" id="delete_user_submit" value="Delete" />
104
+ <input type="submit" name="delete_user_submit" id="delete_user_submit" value="Delete" style="border: 4px solid red;" />
105
105
  </fieldset>
106
106
  </form>
107
107
 
@@ -5,20 +5,23 @@
5
5
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
6
  </head>
7
7
  <body>
8
- <img />
9
- <img src="images/1.gif" alt="1" title="The number one!" />
10
- <img src="images/2.gif" alt="2" />
11
- <img src="images/3.gif" alt="3" />
12
- <img src="images/circle.jpg" name="circle" alt="circle" title="Circle" />
13
- <img src="images/square.jpg" name="square" alt="square" id="square" title="Square" />
14
- <img src="images/triangle.jpg" id="triangle" usemap="#triangle_map" />
15
- <img src="images/no_such_file.jpg" id="no_such_file" />
16
- <map id ="triangle_map" name="triangle_map">
17
- <area id="NCE" name="NCE" shape ="rect" coords ="40,0,70,25" href ="non_control_elements.html" alt="Non-control elements" title="Non-control elements" />
18
- <area id="tables" name="tables" shape ="rect" coords ="0,80,20,98" href ="tables.html" alt="Tables" title="Tables" />
19
- </map>
20
- <map>
21
- <area></area>
22
- </map>
8
+ <div>
9
+ <img />
10
+ <img src="images/1.gif" alt="1" title="The number one!" />
11
+ <img src="images/2.gif" alt="2" />
12
+ <img src="images/3.gif" alt="3" />
13
+ <img src="images/circle.jpg" name="circle" alt="circle" title="Circle" />
14
+ <img src="images/square.jpg" name="square" alt="square" id="square" title="Square" />
15
+ <img src="images/triangle.jpg" id="triangle" usemap="#triangle_map" />
16
+ <img src="images/no_such_file.jpg" id="no_such_file" />
17
+ <img src="images/1.gif" alt="1" id="non_self_closing"></img>
18
+ <map id ="triangle_map" name="triangle_map">
19
+ <area id="NCE" name="NCE" shape ="rect" coords ="40,0,70,25" href ="non_control_elements.html" alt="Non-control elements" title="Non-control elements" />
20
+ <area id="tables" name="tables" shape ="rect" coords ="0,80,20,98" href ="tables.html" alt="Tables" title="Tables" />
21
+ </map>
22
+ <map>
23
+ <area></area>
24
+ </map>
25
+ </div>
23
26
  </body>
24
27
  </html>
@@ -0,0 +1,16 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml">
4
+ <head>
5
+ <meta http-equiv="Content-type" content="text/html; charset=iso-8859-1" />
6
+ <title>
7
+ ISO-8859-1
8
+ </title>
9
+ </head>
10
+ <body>
11
+ <p>
12
+ ���
13
+ </p>
14
+ <input type="text" id="charset" value="">
15
+ </body>
16
+ </html>
@@ -8,8 +8,8 @@
8
8
  <div></div>
9
9
  <div id="outer_container">
10
10
  <div id="header" title="Header and primary navigation" class="profile">
11
- <h1>Header 1</h1>
12
- <ul id="navbar">
11
+ <h1 id="first_header" class="primary">Header 1</h1>
12
+ <ul id="navbar" class="navigation">
13
13
  <li><a></a></li>
14
14
  <li><a id="link_2" title="link_title_2" href="non_control_elements.html" class="external">Link 2</a></li>
15
15
  <li><a id="link_3" title="link_title_3" href="forms_with_input_elements.html" name="bad_attribute" value="bad_attribute" class="external">Link 3</a></li>
@@ -20,20 +20,40 @@
20
20
  </ul>
21
21
  </div>
22
22
  <div id="promo" name="invalid_attribute" value="invalid_attribute">
23
+ <h2>Promo</h2>
23
24
  <span id="lead" class="lead" title="Lorem ipsum">Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Curabitur eu pede. Ut justo. Praesent feugiat, elit in feugiat iaculis, sem risus rutrum justo, eget fermentum dolor arcu non nunc.</span>
24
25
  <span name="invalid_attribute" value="invalid_attribute">Sed pretium metus et quam. Nullam odio dolor, vestibulum non, tempor ut, vehicula sed, sapien. Vestibulum placerat ligula at quam. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.</span>
25
26
  <span>Suspendisse at ipsum a turpis viverra venenatis. Praesent ut nibh. Nullam eu odio. Donec tempor, elit ut lacinia porttitor, augue neque vehicula diam, in elementum ligula nisi a tellus. Aliquam vestibulum ultricies tortor. </span>
26
27
  <span>Dubito, ergo cogito, ergo sum.</span>
27
28
  <span></span>
29
+ <h3>Chemical compunds</h3>
30
+ <ul>
31
+ <li>Abietic acid, C20H30O2</li>
32
+ <li>Acenaphthene, C12H10</li>
33
+ <li>Acenaphthoquinone, C12H6O2</li>
34
+ <li>Acenaphthylene, C12H8</li>
35
+ <li>Acetaldehyde (ethanal), CH3CHO</li>
36
+ </ul>
37
+ <ol id="favorite_compounds" class="chemistry">
38
+ <li>Propanol, CH3CH2CH2OH</li>
39
+ <li>Ethane, C2H6</li>
40
+ <li>Hexene, C6H12</li>
41
+ <li>Acetone, CH3COCH3</li>
42
+ <li>Ethanol, CH3CH2OH</li>
43
+ </ol>
44
+ <ol>
45
+ <li></li>
46
+ </ol>
28
47
  </div>
29
48
  <div id="content">
49
+ <h2>Content</h2>
30
50
  <p id="lead" class="lead" title="Lorem ipsum">Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Curabitur eu pede. Ut justo. Praesent feugiat, elit in feugiat iaculis, sem risus rutrum justo, eget fermentum dolor arcu non nunc.</p>
31
51
  <p name="invalid_attribute" value="invalid_attribute">Sed pretium metus et quam. Nullam odio dolor, vestibulum non, tempor ut, vehicula sed, sapien. Vestibulum placerat ligula at quam. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.</p>
32
52
  <p>Suspendisse at ipsum a turpis viverra venenatis. Praesent ut nibh. Nullam eu odio. Donec tempor, elit ut lacinia porttitor, augue neque vehicula diam, in elementum ligula nisi a tellus. Aliquam vestibulum ultricies tortor. </p>
33
53
  <p>Dubito, ergo cogito, ergo sum.</p>
34
54
  <p></p>
35
55
  <pre></pre>
36
- <div id="best_language" onclick="this.innerHTML = 'Ruby!'">What's the best programming language?</div>
56
+ <div id="best_language" onclick="this.innerHTML = 'Ruby!'" style="color: red; text-decoration: underline; cursor: pointer;">What's the best programming language?</div>
37
57
  <h2>Ruby RSpec example</h2>
38
58
  <pre class="ruby" id="rspec">
39
59
  @browser.pre(:id, "rspec").should exist
@@ -78,7 +98,11 @@
78
98
  >. Print newline
79
99
  </pre>
80
100
  </div>
81
-
101
+ <div id="html_test" class=some_class title = "This is a title">
102
+ <h1>Something new</h1>
103
+ asdf
104
+ <h6></h6>
105
+ </div>
82
106
  <div id="footer" title="Closing remarks" class="profile">
83
107
  <span class="footer" name="footer" onclick="this.innerHTML = 'This is a footer with text set by Javascript.'">This is a footer.</span>
84
108
  </div>