def check_file_presence
      spec.icons.values.each do |path|
        fail_if_not_exist "Icon", path
      end

      if spec.browser_action
        fail_if_not_exist "Browser action popup", spec.browser_action.popup
        fail_if_not_exist "Browser action icon", spec.browser_action.icon
      end

      if spec.page_action
        fail_if_not_exist "Page action popup", spec.page_action.popup
        fail_if_not_exist "Page action icon", spec.page_action.icon
      end

      if spec.packaged_app
        fail_if_not_exist "App launch page", spec.packaged_app.page
      end

      spec.content_scripts.each do |content_script|
        content_script.javascripts.each do |script_path|
          fail_if_not_exist "Content script javascript", script_path
        end
        content_script.stylesheets.each do |style_path|
          fail_if_not_exist "Content script style", style_path
        end
      end

      spec.background_scripts.each do |script_path|
        fail_if_not_exist "Background script style", script_path
      end

      fail_if_not_exist "Background page", spec.background_page
      fail_if_not_exist "Options page", spec.options_page

      spec.web_intents.each do |web_intent|
        fail_if_not_exist "Web intent href", web_intent.href
      end

      spec.nacl_modules.each do |nacl_module|
        fail_if_not_exist "NaCl module", nacl_module.path
      end

      spec.web_accessible_resources.each do |path|
        fail_if_not_exist "Web accessible resource", path
      end
    end
def check_file_presence
      spec.icons.values.each do |path|
        fail_if_not_exist "Icon", path
      end

      if spec.browser_action
        fail_if_not_exist "Browser action popup", spec.browser_action.popup
        fail_if_not_exist "Browser action icon", spec.browser_action.icon
      end

      if spec.page_action
        fail_if_not_exist "Page action popup", spec.page_action.popup
        fail_if_not_exist "Page action icon", spec.page_action.icon
      end

      if spec.packaged_app
        fail_if_not_exist "App launch page", spec.packaged_app.page
      end

      spec.content_scripts.each do |content_script|
        content_script.javascripts.each do |script_path|
          fail_if_not_exist "Content script javascript", script_path
        end
        content_script.stylesheets.each do |style_path|
          fail_if_not_exist "Content script style", style_path
        end
      end

      spec.background_scripts.each do |script_path|
        fail_if_not_exist "Background script style", script_path
      end

      fail_if_not_exist "Background page", spec.background_page
      fail_if_not_exist "Options page", spec.options_page

      spec.web_intents.each do |web_intent|
        fail_if_not_exist "Web intent href", web_intent.href
      end

      spec.nacl_modules.each do |nacl_module|
        fail_if_not_exist "NaCl module", nacl_module.path
      end

      spec.web_accessible_resources.each do |path|
        fail_if_not_exist "Web accessible resource", path
      end
    end
def check_file_presence spec . icons . values . each do | path | fail_if_not_exist "Icon" , path end if spec . browser_action fail_if_not_exist "Browser action popup" , spec . browser_action . popup fail_if_not_exist "Browser action icon" , spec . browser_action . icon end if spec . page_action fail_if_not_exist "Page action popup" , spec . page_action . popup fail_if_not_exist "Page action icon" , spec . page_action . icon end if spec . packaged_app fail_if_not_exist "App launch page" , spec . packaged_app . page end spec . content_scripts . each do | content_script | content_script . javascripts . each do | script_path | fail_if_not_exist "Content script javascript" , script_path end content_script . stylesheets . each do | style_path | fail_if_not_exist "Content script style" , style_path end end spec . background_scripts . each do | script_path | fail_if_not_exist "Background script style" , script_path end fail_if_not_exist "Background page" , spec . background_page fail_if_not_exist "Options page" , spec . options_page spec . web_intents . each do | web_intent | fail_if_not_exist "Web intent href" , web_intent . href end spec . nacl_modules . each do | nacl_module | fail_if_not_exist "NaCl module" , nacl_module . path end spec . web_accessible_resources . each do | path | fail_if_not_exist "Web accessible resource" , path end end
Go through the specification checking that files that are pointed to
 actually exist
Go through the specification checking that files that are pointed to actually exist